Thread: text

  1. #1
    Registered User
    Join Date
    Aug 2001


    Can anybody give me an advice or function how to make a program that reads at the beginning the first line of a *.txt file, then if you push something the second and so on and so on.....

    thanx in advance

    getch(); but how to make the other functions

  2. #2
    ifstream fin(filenameHere);
    char dummy[256];
    char ch;

    fin.getline(dummy, 256);

    cout << dummy;
    cout << "enter any key and press the enter key to get the next line" << endl;
    cin >> ch;
    fin.getline(dummy, 256);

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A bunch of Linker Errors...
    By Junior89 in forum Windows Programming
    Replies: 4
    Last Post: 01-06-2006, 02:59 PM
  2. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 04:49 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. Ok, Structs, I need help I am not familiar with them
    By incognito in forum C++ Programming
    Replies: 7
    Last Post: 06-29-2002, 09:45 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM