Click here to Skip to main content
15,922,533 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
Michael Dunn4-Apr-05 12:47
sitebuilderMichael Dunn4-Apr-05 12:47 
GeneralRe: ShowHTMLDialog working with XP not Win98 Pin
georgiek505-Apr-05 5:46
georgiek505-Apr-05 5:46 
GeneralCTreeCtrl items highlight Pin
Maximilien4-Apr-05 8:10
Maximilien4-Apr-05 8:10 
GeneralRe: CTreeCtrl items highlight Pin
Neville Franks4-Apr-05 11:16
Neville Franks4-Apr-05 11:16 
GeneralRe: CTreeCtrl items highlight Pin
Maximilien4-Apr-05 12:47
Maximilien4-Apr-05 12:47 
GeneralResources not included Pin
dabs4-Apr-05 8:10
dabs4-Apr-05 8:10 
Questionhow to write in text file Pin
smarty124-Apr-05 7:55
smarty124-Apr-05 7:55 
AnswerRe: how to write in text file Pin
NewbieStats4-Apr-05 9:24
NewbieStats4-Apr-05 9:24 
Add ur header:
<br />
#include "fstream.h"<br />

To write to File "Title.txt", at end of file.
<br />
ofstream a_file ( "Title.txt", ios::ate, ios::app);<br />
a_file<< "Data";<br />
a_file.close();<br />

To read from File "Title.txt"
<br />
char idata[256];<br />
ifstream b_file ( "Title.txt" );<br />
  while (! b_file.eof() ) // From beginning to End of File.<br />
  {<br />
  b_file.getline(idata,256);<br />
  cout<< idata <<endl; // Needs header iostream.h<br />
  }<br />

Hope it Helps... Replace the "Title.Txt" or "Data" with a variable and dont use the ""'s and you can have it set by user. Does this help?

/* Just a Human Trying to Live in a Computers World. */
GeneralSecure FTP Pin
Member 18509854-Apr-05 6:39
Member 18509854-Apr-05 6:39 
GeneralRe: Secure FTP Pin
RobJones4-Apr-05 7:27
RobJones4-Apr-05 7:27 
GeneralScrollBar Message Handling Pin
blinkered4-Apr-05 6:28
blinkered4-Apr-05 6:28 
GeneralRe: ScrollBar Message Handling Pin
PJ Arends4-Apr-05 8:26
professionalPJ Arends4-Apr-05 8:26 
GeneralHelp Urgent, Windows folder size without file searching Pin
inbakumar.G4-Apr-05 5:57
inbakumar.G4-Apr-05 5:57 
GeneralRe: Help Urgent, Windows folder size without file searching Pin
David Crow4-Apr-05 9:40
David Crow4-Apr-05 9:40 
GeneralWindows Search Pin
Anonymous4-Apr-05 5:44
Anonymous4-Apr-05 5:44 
GeneralRe: Windows Search Pin
David Crow4-Apr-05 17:15
David Crow4-Apr-05 17:15 
GeneralBitmap of CBitmapButton not working Pin
greekgoddj4-Apr-05 5:30
greekgoddj4-Apr-05 5:30 
GeneralRe: Bitmap of CBitmapButton not working Pin
Ryan Binns4-Apr-05 18:58
Ryan Binns4-Apr-05 18:58 
GeneralRe: Bitmap of CBitmapButton not working Pin
greekgoddj4-Apr-05 21:45
greekgoddj4-Apr-05 21:45 
GeneralC++ dll to start another thread from VB Pin
BlackDice4-Apr-05 5:26
BlackDice4-Apr-05 5:26 
Generalreg subkeys Pin
Killer2254-Apr-05 5:26
Killer2254-Apr-05 5:26 
GeneralRe: reg subkeys Pin
PJ Arends4-Apr-05 12:22
professionalPJ Arends4-Apr-05 12:22 
GeneralRe: reg subkeys Pin
Member 18552934-Apr-05 19:21
Member 18552934-Apr-05 19:21 
GeneralRe: reg subkeys Pin
PJ Arends5-Apr-05 9:18
professionalPJ Arends5-Apr-05 9:18 
GeneralRe: reg subkeys Pin
hunter135-Apr-05 19:22
hunter135-Apr-05 19:22 

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.