Please help me with it
ASAP
Please
C++
Lab 2.1 structWrite a complete program wit...
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
Answers: 1
Computers and Technology, 22.06.2019 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
Computers and Technology, 24.06.2019 00:30
Which boolean operator enables you to exclude a search term? a} not b} and c} or d} plus
Answers: 1
Computers and Technology, 24.06.2019 07:30
Aproject involves many computing systems working together on disjointed task towards a single goal what form of computing would the project be using
Answers: 3
Computers and Technology, 25.06.2019 05:50
Acolor class has three public, integer-returning accessor methods: getred, getgreen, and getblue, and three protected, void-returning mutator methods: setred, setgreen, setblue, each of which accepts an integer parameter and assigns it to the corresponding color component. the class, alphachannelcolor-- a subclass of color-- has an integer instance variable, alpha, containing the alpha channel value, representing the degree of transparency of the color. alphachannelcolor also has a method named dissolve (void-returning, and no parameters), that causes the color to fade a bit. it does this by incrementing (by 1) all three color components (using the above accessor and mutator methods) as well as the alpha component value. write the dissolve method.
Answers: 2
Mathematics, 07.01.2021 23:00
Chemistry, 07.01.2021 23:00
Mathematics, 07.01.2021 23:00
Chemistry, 07.01.2021 23:00
Mathematics, 07.01.2021 23:00
Mathematics, 07.01.2021 23:00
History, 07.01.2021 23:00
Mathematics, 07.01.2021 23:00
English, 07.01.2021 23:00
English, 07.01.2021 23:00
Mathematics, 07.01.2021 23:00