text

This is a discussion on text within the C++ Programming forums, part of the General Programming Boards category; Can anybody give me an advice or function how to make a program that reads at the beginning the first ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    17

    text

    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
    Unregistered
    Guest
    ifstream fin(filenameHere);
    char dummy[256];
    char ch;

    fin.getline(dummy, 256);

    while(fin)
    {
    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, 10: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, 10:45 PM
  5. Outputting String arrays in windows
    By Xterria in forum Game Programming
    Replies: 11
    Last Post: 11-13-2001, 07:35 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21