subject

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
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
What role do chromosomes play in inheritance?
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
If an improvement creates no significant change in a product’s performance, then it is a(n) ? a0 design improvement. (there are no answer choices)
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
question
Computers and Technology, 24.06.2019 06:50
What are the things you are considering before uploading photos on social media?
Answers: 1
You know the right answer?
Please help me with it ASAP
Please
C++
Lab 2.1 structWrite a complete program wit...
Questions
question
Mathematics, 29.03.2021 23:20
question
Mathematics, 29.03.2021 23:20
question
Mathematics, 29.03.2021 23:20
Questions on the website: 13722363