Greetings,
Assuming that inStream is opened as a connection to an input file that contains the following data:
b = blank
below is the data: in inStream
b 54 b 32E1 enter -6.78 b $80 enter enter b 1 enter eof()
and the following declarations are
int n1, n2, n3, n4;
double
r1, r2, r3;
char
c1, c2, c3, c4
List the values that are assigned to each of the variables in the input list or explain why an error occurs.
eg;
inStream >> n1 >> n2 >> c1 >> c2 >> c3
>> r1 >> c4 >> n2 >> r2;
I understand that inStream uses <fstream> and basically its like cin in <istream> . Am i correct to say that the >> reads a variable and skips past the newlinw, blanks, etc.... Can anyone give me an example.