Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralTool Tip Appearance Time Pin
Marty1020304019-Sep-03 6:11
Marty1020304019-Sep-03 6:11 
Generalmail verifier Pin
Max Santos19-Sep-03 5:53
Max Santos19-Sep-03 5:53 
GeneralInstallshield DLL Problem Pin
Anonymous19-Sep-03 5:42
Anonymous19-Sep-03 5:42 
GeneralInstallshield Pin
Anonymous19-Sep-03 5:36
Anonymous19-Sep-03 5:36 
QuestionHow to create a VC program to read text Pin
harshsingh19-Sep-03 5:13
harshsingh19-Sep-03 5:13 
AnswerRe: How to create a VC program to read text Pin
keegan19-Sep-03 5:41
keegan19-Sep-03 5:41 
GeneralRe: How to create a VC program to read text Pin
harshsingh21-Sep-03 18:24
harshsingh21-Sep-03 18:24 
GeneralRe: How to create a VC program to read text Pin
keegan21-Sep-03 20:58
keegan21-Sep-03 20:58 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang98/html/_iostream_fstream.3a3a.fstream.asp

thats an insane description of fstream. I'll show you an example of one way to write to files here:

string filename = "data.txt";      //the name of the file we want to input from / output to
	ifstream inFile(filename.c_str());    //'sets up' input from a file
	ofstream Out;                        //sets up output to a file

        //input a word from a file:
        string word;
        inFIle >> word;

        //output that word to a file:
        Out << word;



ifstream and ofstream are more or less identical in terms of use to cin and cout. Once you define the input and output streams, they work the exact same way (more or less). If you have any more questions, feel free to email me.

*.*
cin >> knowledge;
AnswerRe: How to create a VC program to read text Pin
PremL19-Sep-03 5:48
PremL19-Sep-03 5:48 
GeneralModal dialog does not come to the foreground Pin
Salvador Dali19-Sep-03 5:07
Salvador Dali19-Sep-03 5:07 
GeneralRe: Modal dialog does not come to the foreground Pin
JWood19-Sep-03 5:17
JWood19-Sep-03 5:17 
Generaladd code to standard Save Pin
doctorpi19-Sep-03 4:51
doctorpi19-Sep-03 4:51 
GeneralRe: add code to standard Save Pin
JWood19-Sep-03 5:24
JWood19-Sep-03 5:24 
GeneralRe: add code to standard Save Pin
Dangleberry19-Sep-03 5:25
sussDangleberry19-Sep-03 5:25 
GeneralRe: add code to standard Save Pin
Dangleberry19-Sep-03 5:29
sussDangleberry19-Sep-03 5:29 
GeneralRe: add code to standard Save Pin
doctorpi19-Sep-03 5:32
doctorpi19-Sep-03 5:32 
GeneralRe: add code to standard Save Pin
doctorpi19-Sep-03 5:42
doctorpi19-Sep-03 5:42 
GeneralDisabling/Enabling a serial port Pin
neffc19-Sep-03 3:41
neffc19-Sep-03 3:41 
GeneralRe: Disabling/Enabling a serial port Pin
valikac19-Sep-03 4:50
valikac19-Sep-03 4:50 
GeneralCompareNoCase fails Pin
r i s h a b h s19-Sep-03 3:36
r i s h a b h s19-Sep-03 3:36 
GeneralRe: CompareNoCase fails Pin
RobJones19-Sep-03 3:40
RobJones19-Sep-03 3:40 
GeneralRe: CompareNoCase fails Pin
David Crow19-Sep-03 4:04
David Crow19-Sep-03 4:04 
GeneralRe: CompareNoCase fails Pin
Mike Dimmick19-Sep-03 4:19
Mike Dimmick19-Sep-03 4:19 
GeneralRe: CompareNoCase fails Pin
Gary R. Wheeler20-Sep-03 4:03
Gary R. Wheeler20-Sep-03 4:03 
Generalnumerical values help! Pin
coda_x19-Sep-03 2:27
coda_x19-Sep-03 2:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.