thanks, but I haven't study array yet. The assignment is using the loop to read each character in a line and store them to a variable (newPart += ch) until it hits the pound (#) sign, and then read...
Type: Posts; User: Dnyt
thanks, but I haven't study array yet. The assignment is using the loop to read each character in a line and store them to a variable (newPart += ch) until it hits the pound (#) sign, and then read...
That's I have problem in there
If I write:
while (!inData.eof()) {
cout<<ch;
inData.get(ch);
}
Hello,
How do you read a file in C++?
For example, I have a text file data.txt contains:
hammer#12.20
saw#20.50
shovel#9.25
Now I need to write a program to read all the data in data.txt...