searching files

This is a discussion on searching files within the C++ Programming forums, part of the General Programming Boards category; wondering if anyone can help. i am trying to write a program that searches a file and adds every word ...

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    57

    searching files

    wondering if anyone can help. i am trying to write a program that searches a file and adds every word to an array. i want to make it so that the user can type in the name of the file from the console. pretty much like this......
    cout << "enter name";
    cin >> name;
    in_stream.open(name);

    anyone know how this can be done?

  2. #2
    Registered User
    Join Date
    Feb 2003
    Posts
    29
    You seem to know pretty much what you wanna do. Hereīs my advice:

    1. Write pseudo
    2. Convert to C++
    3. Compile and Run
    4. Find errors, and if you canīt, then come back here and ask!

    Specific questions can be asked and answered too..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Doxygen failing
    By Elysia in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 04-16-2008, 01:24 PM
  2. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 01:41 PM
  3. Folding@Home Cboard team?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 398
    Last Post: 10-11-2005, 08:44 AM
  4. Searching txt files (another file i/o qn)
    By Catif in forum C++ Programming
    Replies: 9
    Last Post: 05-13-2002, 04:14 PM
  5. displaying text files, wierd thing :(
    By Gades in forum C Programming
    Replies: 2
    Last Post: 11-20-2001, 04:18 PM

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