Search:

Type: Posts; User: Dnyt

Search: Search took 0.00 seconds.

  1. Thread: C++ read file ?

    by Dnyt
    Replies
    5
    Views
    6,718

    thanks, but I haven't study array yet. The...

    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...
  2. Thread: C++ read file ?

    by Dnyt
    Replies
    5
    Views
    6,718

    That's I have problem in there If I write: ...

    That's I have problem in there
    If I write:

    while (!inData.eof()) {

    cout<<ch;

    inData.get(ch);

    }
  3. Thread: C++ read file ?

    by Dnyt
    Replies
    5
    Views
    6,718

    C++ read file ?

    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...
Results 1 to 3 of 3