How to represent "RESERVED 1 byte" & "RESERVED 4 byte" in a line ...!!

S

ssmile03

I have a LINE having different entries (data, char, string, int, space, blank) like | A | | 12 | | SPACE | BLANK | RESERVED 4 BYTE | 90 | 45 | RESERVED 1 BYTE | | ...

How to represent SPACE, BLANK, RESERVED 1 BYTE and RESERVED 4 BYTE in a line when allowed to write to a file through ofstream inp?

E.g:

std::cout <<"PLEASE ENTER THE QUANTITY: ";
cin >> qty;
std::cout <<"PLEASE ENTER THE name: ";
cin >> dPrice;
inp <<"ENTRY=" "|" " " "5000" " " "|" " " "5001" " " "|" " " "0" " " "|" ..

Thanks
 
A

Alf P. Steinbach

I have a LINE having different entries (data, char, string, int, space, blank) like | A | | 12 | | SPACE | BLANK | RESERVED 4 BYTE | 90 | 45 | RESERVED 1 BYTE | | ...

How to represent SPACE, BLANK, RESERVED 1 BYTE and RESERVED 4 BYTE in a line when allowed to write to a file through ofstream inp?

E.g:

std::cout <<"PLEASE ENTER THE QUANTITY: ";
cin >> qty;
std::cout <<"PLEASE ENTER THE name: ";
cin >> dPrice;
inp <<"ENTRY=" "|" " " "5000" " " "|" " " "5001" " " "|" " " "0" " " "|" ..

Thanks

The question is very unclear.

It appears to about some original (homework?) question stated by someone
else.

Perhaps quote that, and indicate what the C++ problem is?


Cheers & hth.,

- Alf
 
O

osmium

Alf P. Steinbach said:
The question is very unclear.

It appears to about some original (homework?) question stated by someone
else.

Perhaps quote that, and indicate what the C++ problem is?

Amen on the unclear. I keep thinking he wants something like a COBOL
PICTURE statement, clause, whatever, and has a radical misconception of some
sort. I would remind the OP that the meaning of data is in the *mind* of
the person that wrote the code that wrote the file. The meaning is not
embedded in the code, per se.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top