Search:

Type: Posts; User: jedo

Search: Search took 0.00 seconds.

  1. Replies
    7
    Views
    2,208

    Ok, Everthing works fine now, thanks. The...

    Ok,

    Everthing works fine now, thanks.

    The only problem is when open a student's information it displays his name with ".txt"

    Example:

    Name: Bob.txt
  2. Replies
    7
    Views
    2,208

    Ok, now is compiles just fine but when a run...

    Ok,

    now is compiles just fine but when a run it the program displays as follows



    Is doesn't display anything else

    -thanks
  3. Replies
    7
    Views
    2,208

    I/O--Using a variable as a filename

    Hey,

    I am coding a program where the user enters the name of a student and the program looks for a file named [the student name] + .txt.

    the code I use the read from the file looks like this:...
  4. Thread: i/o program

    by jedo
    Replies
    8
    Views
    1,037

    Yes, I fixed it. Thank you guys so much,...

    Yes, I fixed it.

    Thank you guys so much, everything is working fine now.

    Thanks
  5. Thread: i/o program

    by jedo
    Replies
    8
    Views
    1,037

    Ok guys, The ofstream a_file (name.c_str());...

    Ok guys,

    The ofstream a_file (name.c_str()); worked out and now it works fine.

    Now onto when the user looks-up a student. The code looks like this


    ifstream b_file ( name.c_str() );
    ...
  6. Thread: i/o program

    by jedo
    Replies
    8
    Views
    1,037

    Thanks for taking time to help. I'm able to...

    Thanks for taking time to help.

    I'm able to get the name and add text with the following piece of code


    string name = "";
    cout << "Name:";
    cin >> name;
    name += ".txt";
  7. Thread: i/o program

    by jedo
    Replies
    8
    Views
    1,037

    i/o program

    I am currently working on a program where the user types in a student's name and it displays his information. The information about the student is saved into a text file.

    Is it possible for the...
Results 1 to 7 of 7