Click here to Skip to main content
15,913,115 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: what to include to use XMLReader? Pin
Sam_c15-May-07 3:37
Sam_c15-May-07 3:37 
QuestionCScrollBar SB_LINEDOWN Pin
bob1697214-May-07 12:23
bob1697214-May-07 12:23 
AnswerRe: CScrollBar SB_LINEDOWN Pin
Mark Salsbery14-May-07 14:16
Mark Salsbery14-May-07 14:16 
GeneralRe: CScrollBar SB_LINEDOWN Pin
bob1697214-May-07 17:18
bob1697214-May-07 17:18 
GeneralRe: CScrollBar SB_LINEDOWN Pin
bob1697214-May-07 17:39
bob1697214-May-07 17:39 
GeneralRe: CScrollBar SB_LINEDOWN Pin
Mark Salsbery15-May-07 4:16
Mark Salsbery15-May-07 4:16 
AnswerRe: CScrollBar SB_LINEDOWN Pin
Mark Salsbery14-May-07 14:58
Mark Salsbery14-May-07 14:58 
Questionofstream problems Pin
CS92514-May-07 11:43
CS92514-May-07 11:43 
Hi,
I am writing a C++ program and am trying to send an array of integers to a text file, however, when I open the text file, it looks like this: ⰸⰶⰰⰹⰲⰰⰰⰰⰰⰰⰰⰲⰴⰶ
At an earlier part in the program, I sent an array of integers, but the file came out like I intended it to. I don't know why it doesn't come out correctly for the other piece of code.
This is the code that doesn't work correctly:
ofstream game(name.c_str());<br />
  if(game.is_open())<br />
  {<br />
    for(int i = 0; i < 81; i++)<br />
    {<br />
      game << g_ivalues[i] << ",";<br />
    }<br />
    game.close();<br />
  }
Please note that all the variable listed are declared.
This piece of code does work correctly for me though:
ofstream profiles(name.c_str(), ios::out);<br />
  if(profiles.is_open())<br />
  {<br />
    for(int i = 0; i < 100; i++)<br />
    {<br />
      profiles << g_ipuzplayed[i] << ",";<br />
    }<br />
  }<br />
  profiles.close();
Any thoughts on why they don't work the same?
Thanks in advance!

Chris

QuestionRe: ofstream problems Pin
David Crow14-May-07 16:17
David Crow14-May-07 16:17 
Question%systemroot% Pin
dellthinker14-May-07 11:35
dellthinker14-May-07 11:35 
AnswerRe: %systemroot% Pin
Michael Dunn14-May-07 12:00
sitebuilderMichael Dunn14-May-07 12:00 
AnswerRe: %systemroot% Pin
KaЯl14-May-07 12:01
KaЯl14-May-07 12:01 
AnswerRe: %systemroot% Pin
Mark Salsbery14-May-07 12:06
Mark Salsbery14-May-07 12:06 
GeneralRe: %systemroot% Pin
dellthinker16-May-07 5:49
dellthinker16-May-07 5:49 
QuestionINF Install in Visual C Application Pin
rachis14-May-07 10:59
rachis14-May-07 10:59 
AnswerRe: INF Install in Visual C Application Pin
JudyL_MD15-May-07 3:59
JudyL_MD15-May-07 3:59 
QuestionReally Urgent, Keyboard Input using SendInput Pin
Mohammad A Gdeisat14-May-07 10:57
Mohammad A Gdeisat14-May-07 10:57 
AnswerRe: Really Urgent, Keyboard Input using SendInput Pin
CPallini14-May-07 11:25
mveCPallini14-May-07 11:25 
GeneralRe: Really Urgent, Keyboard Input using SendInput Pin
Mohammad A Gdeisat14-May-07 20:25
Mohammad A Gdeisat14-May-07 20:25 
GeneralRe: Really Urgent, Keyboard Input using SendInput Pin
CPallini14-May-07 20:49
mveCPallini14-May-07 20:49 
QuestionQuestion about Harddrive writes Pin
godspeed12314-May-07 10:15
godspeed12314-May-07 10:15 
QuestionRe: Question about Harddrive writes Pin
JudyL_MD14-May-07 10:20
JudyL_MD14-May-07 10:20 
AnswerRe: Question about Harddrive writes Pin
godspeed12314-May-07 10:27
godspeed12314-May-07 10:27 
GeneralRe: Question about Harddrive writes Pin
David Crow14-May-07 10:39
David Crow14-May-07 10:39 
GeneralRe: Question about Harddrive writes Pin
godspeed12314-May-07 10:43
godspeed12314-May-07 10:43 

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.