![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 08.07.2021 02:20 dlasheab
Please help me with it
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, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 22:50
What is an rss reader used for? for creating a user account on a social new site
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 23:40
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
You know the right answer?
Please help me with it
Lab 2.1 structWrite a complete program with a struct to hold the data for on...
Questions
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 12.10.2020 03:01
![question](/tpl/images/cats/biologiya.png)
Biology, 12.10.2020 03:01
![question](/tpl/images/cats/mat.png)
Mathematics, 12.10.2020 03:01
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 12.10.2020 03:01
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 12.10.2020 03:01
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 12.10.2020 03:01
![question](/tpl/images/cats/en.png)
English, 12.10.2020 03:01
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 12.10.2020 03:01