>using xcode's debugger i established that names was >being filled
So where's the problem? It's just not printing the name? Can you give us a 
sample run with output or something?
It's really hard for us to look at a loop and say "this is your problem. 
because from what I can tell, that loop looks fine, which means it's either 
higher in the code, or names isn't being filled.


Thanks,
_|_|_|_|_|  _|        _|_|_|_|            
    _|      _|_|_|    _|          _|_|_|  
    _|      _|    _|  _|_|_|    _|        
    _|      _|    _|  _|        _|        
    _|      _|    _|  _|_|_|_|    _|_|_|  
Visit TDS for quality software and website production
http://tysdomain.com
msn: [EMAIL PROTECTED]
aim: st8amnd2005
skype: st8amnd127
  ----- Original Message ----- 
  From: Paul David 
  To: [email protected] 
  Sent: Sunday, October 05, 2008 10:57 AM
  Subject: Re: [c-prog] file output


  using xcode's debugger i established that names was being filled
  On Oct 5, 2008, at 9:55 AM, Tyler Littlefield wrote:

  > well, based on what you provided:
  > >the declarations are as follows:
  > >
  > >ifstream ifile;
  > >ofstream ofile;
  > >string names[10], names2[10], final_name = "";
  > >int highscores[10], highscores2[10], numhighscores = 0;
  > >
  > I'd assume that names isn't being filled.
  > Also, if your starting your loop with for (i=0...) why do you check 
  > to see if i==0? just print an endl before the loop and start it at 1.
  > Thanks,
  > _|_|_|_|_| _| _|_|_|_|
  > _| _|_|_| _| _|_|_|
  > _| _| _| _|_|_| _|
  > _| _| _| _| _|
  > _| _| _| _|_|_|_| _|_|_|
  > Visit TDS for quality software and website production
  > http://tysdomain.com
  > msn: [EMAIL PROTECTED]
  > aim: st8amnd2005
  > skype: st8amnd127
  > ----- Original Message -----
  > From: Paul David
  > To: [email protected]
  > Sent: Sunday, October 05, 2008 10:52 AM
  > Subject: Re: [c-prog] file output
  >
  > the declarations are as follows:
  >
  > ifstream ifile;
  > ofstream ofile;
  > string names[10], names2[10], final_name = "";
  > int highscores[10], highscores2[10], numhighscores = 0;
  >
  > On Oct 5, 2008, at 9:47 AM, Tyler Littlefield wrote:
  >
  > > when you compile with all warnings on, what do you get? Your pasting
  > > a loop. I don't see your names declarations or anything.
  > >
  > > Thanks,
  > > _|_|_|_|_| _| _|_|_|_|
  > > _| _|_|_| _| _|_|_|
  > > _| _| _| _|_|_| _|
  > > _| _| _| _| _|
  > > _| _| _| _|_|_|_| _|_|_|
  > > Visit TDS for quality software and website production
  > > http://tysdomain.com
  > > msn: [EMAIL PROTECTED]
  > > aim: st8amnd2005
  > > skype: st8amnd127
  > > ----- Original Message -----
  > > From: Paul David
  > > To: [email protected]
  > > Sent: Sunday, October 05, 2008 10:44 AM
  > > Subject: Re: [c-prog] file output
  > >
  > > i'm using C++
  > > On Oct 4, 2008, at 8:14 PM, Paul David wrote:
  > >
  > > > ofile.open("High Scores.txt");
  > > > for(int i = 0; i < numhighscores; i++)
  > > > {
  > > > if(i > 0)
  > > > {
  > > > ofile << endl;
  > > > }
  > > > ofile << highscores[i] << endl;
  > > > ofile << names[i];
  > > > }
  > > > ofile.close();
  > > >
  > > > In this code numhighscores is an int, highscores is an array of
  > > ints,
  > > > names is an array of strings, ofile is an ofstream from the 
  > fstream
  > > > header file
  > > >
  > > > Why are the highscores printed but not the names?
  > > >
  > > > please help and thanks in advance for any help
  > > >
  > > > -- Paul David
  > > > [EMAIL PROTECTED]
  > > >
  > > > [Non-text portions of this message have been removed]
  > > >
  > > >
  > > >
  > >
  > > [Non-text portions of this message have been removed]
  > >
  > > __________ NOD32 3495 (20081004) Information __________
  > >
  > > This message was checked by NOD32 antivirus system.
  > > http://www.eset.com
  > >
  > > [Non-text portions of this message have been removed]
  > >
  > >
  > >
  >
  > [Non-text portions of this message have been removed]
  >
  > __________ NOD32 3495 (20081004) Information __________
  >
  > This message was checked by NOD32 antivirus system.
  > http://www.eset.com
  >
  > [Non-text portions of this message have been removed]
  >
  >
  > 

  [Non-text portions of this message have been removed]



   

  __________ NOD32 3495 (20081004) Information __________

  This message was checked by NOD32 antivirus system.
  http://www.eset.com


[Non-text portions of this message have been removed]

Reply via email to