Please help me with it
ASAP
Please
C++
Lab 2.1 structWrite a complete program wit...
![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 08.07.2021 22:10 orlando979
Please help me with it
ASAP
Please
C++
Lab 2.1 structWrite a complete program with a struct to hold the data for one unit (container or pallet). Load the pertinent data and then output it to the screen. Use the following functions:main * Uses new to obtain space for the data structure * Calls the other two functions * Deletes the space obtained using new
input * Reads all the data from the user * Puts all this data into the structure
output * Prints the data in a neat formatPut the main function first. Use the function names and specified above. Arrange the functions in the order listed above. Use the following data and field names:
uld - Pallet
abbreviation - PMC
uldid - PMC46890IB
aircraft - 737
weight - 1289
destination – BFL
#include
#include
using namespace std;
struct Cargo
{
string loadType;
string abbreviation;
string identification;
int aircraft;
int weight;
string destination;
};
void input(Cargo* cPtr);
void output(Cargo* cPtr);
int main ()
{
Cargo* cPtr = new Cargo; // Cargo object in the heap
input(cPtr);
output(cPtr);
delete cPtr;// pointer gone
cPtr = nullptr;
return 0;
}
void input(Cargo* cPtr)
{
cout << "input called\n";
cout << "Please input Container or Pallet: ";
getline(cin, cPtr->loadType); ///eliminates (*cPtr).loadType
}
void output(Cargo *cPtr)
{ cout << "output called\n";
cout << cPtr->loadType << endl;
}
Please help me with the following coding
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 21.06.2019 19:00
When keyboarding, if you want to be fast and accurate you should return your hands on home row with your fingers relaxed and your eyes on the text use only your index fingers to hunt and peck keep your fingers stiff and your eyes on the keys slouch in your chair and keep your fingers hovering over all of the keys
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 14:30
If the polar bear were taken out of the food chain what would happen to the seal population the seal population would diminish the seal population would grow dramatically the seal population would stay the same the seal population would decrease slightly
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 22:00
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
You know the right answer?
Questions
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/en.png)
English, 10.09.2019 08:10
![question](/tpl/images/cats/mat.png)
Mathematics, 10.09.2019 08:10
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 10.09.2019 08:10
![question](/tpl/images/cats/himiya.png)
Chemistry, 10.09.2019 08:10
![question](/tpl/images/cats/biologiya.png)
Biology, 10.09.2019 08:10
![question](/tpl/images/cats/istoriya.png)
History, 10.09.2019 08:10
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
History, 10.09.2019 08:10
![question](/tpl/images/cats/istoriya.png)
History, 10.09.2019 08:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 10.09.2019 08:10
![question](/tpl/images/cats/istoriya.png)
History, 10.09.2019 08:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 10.09.2019 08:10
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 10.09.2019 08:10