ifstream code to read a paragraph
From: CJ (delgato_at_adelphia.net)
Date: 10/30/03
- Next message: ellie fant: "Re: [C] 2-dimensional arrays and functions"
- Previous message: Ulrich Eckhardt: "Re: templated class in microsoft visual c++ 7.0"
- Next in thread: Josh Sebastian: "Re: ifstream code to read a paragraph"
- Reply: Josh Sebastian: "Re: ifstream code to read a paragraph"
- Reply: CJ: "Re: ifstream code to read a paragraph"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Oct 2003 22:52:52 GMT
snip of code below - trying to read in a file with a paragraph in it.
The file is being read in but only the first word of the paragraph displays
The CHAR probably has to be changed but to what can't find a reference in my
book
I'm just practicing on how to get my program to read from a text file
Any help appreciated - I'm just learning
int main()
{
ifstream inFile;
char message [81];
inFile.open("message.txt");
inFile >> message;
cout << message <<endl;
- Next message: ellie fant: "Re: [C] 2-dimensional arrays and functions"
- Previous message: Ulrich Eckhardt: "Re: templated class in microsoft visual c++ 7.0"
- Next in thread: Josh Sebastian: "Re: ifstream code to read a paragraph"
- Reply: Josh Sebastian: "Re: ifstream code to read a paragraph"
- Reply: CJ: "Re: ifstream code to read a paragraph"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|