Computers and Technology
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

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:00, jahi1201
Ahorse is how much percent more powerful than a pony
Answers: 1
image
Computers and Technology, 22.06.2019 03:30, samone26
Some of your friends have gotten into the burgeoning field of time-series data mining, in which one looks for patterns in sequences of events that occur over time. purchases at stock exchanges--what’s being bought-- are one source of data with a natural ordering in time. given a long sequence s of such events, your friends want an efficient way to detect certain "patterns" in them--for example, they may want to know if the four events buy yahoo, buy ebay, buy yahoo, buy oracle occur in this sequence s, in order but not necessarily consecutively. they begin with a collection of possible events (e. g., the possible’ transactions) and a sequence s of n of these events. a given event may occur multiple times in s (e. g., yahoo stock may be bought many times in a single sequence s). we will say that a sequence s’ is a subsequence of s if there is a way to delete certain of the events from s so that the remaining events, in order, are equal to the sequence s’. so, for example, the sequence of four events above is a subsequence of the sequence buy amazon, buy yahoo, buy ebay, buy yahoo, buy yahoo, buy oracle their goal is to be able to dream up short sequences and quickly detect whether they are subsequences of s. so this is the problem they pose to you: give an algorithm that takes two sequences of even~s--s’ of length m and s of length n, each possibly containing an event more than once--and decides in time o(m n) whether s’ is a subsequence of s
Answers: 2
image
Computers and Technology, 22.06.2019 21:30, mima851
Elements such as fonts colors visual structure graphics and the interface of a web page should complement each other to ensure blank
Answers: 3
image
Computers and Technology, 22.06.2019 23:00, maxy7347go
Which factor is the most important when choosing a website host? whether customers will make secure transactions the number of email accounts provided the purpose of the website the quality of the host control panel
Answers: 3
Do you know the correct answer?
Please help me with it Lab 2.1 structWrite a complete program with a struct to hold the data for on...

Questions in other subjects: