5 Replies - 1305 Views - Last Post: 06 November 2001 - 11:13 PM Rate Topic: -----

#1 leapfrog  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 05-November 01

leapfrog

Posted 05 November 2001 - 09:47 PM

cout <<" The presidents before your choice are
";
outfile <<" The presidents before your choice are
";
if (strcmp(name,"Washington")==0)
{cout <<" Washington is the 1st President
";
outfile <<" Washington is the 1st President
";}
else for (j=0; j<=10; j++)
cout << pres[j]<<endl;
after();
}
void after()//displays all the presidents after the user selected president
{
cout <<" The presidents after your choice are
";
outfile <<" The presidents after your choice are
";
if (strcmp(name,"Bush")==0)
{cout <<" Bush is the last President
";
outfile <<" Bush is the last President
";}
else for (j=0; j<=10; j++)
cout << pres[j]<<endl;
}


it has something to do with the last for loops in both functions neither will do the asscending descending order after the user inputs their selection.

(Edited by supersloth at 10:17 am on Nov. 6, 2001)


Is This A Good Question/Topic? 0
  • +

Replies To: leapfrog

#2 VxJasonxV  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 201
  • Joined: 03-October 01

Re: leapfrog

Posted 05 November 2001 - 10:16 PM

note: when posting code, please disable smilies (emoticons).
Was This Post Helpful? 0
  • +
  • -

#3 supersloth  Icon User is offline

  • serial frotteur - RUDEST MEMBER ON D.I.C.
  • member icon


Reputation: 4517
  • View blog
  • Posts: 28,417
  • Joined: 21-March 01

Re: leapfrog

Posted 06 November 2001 - 09:18 AM

frog, i dont see anything being assigned to pres[j], whats in that variable?
Was This Post Helpful? 0
  • +
  • -

#4 blutrane  Icon User is offline

  • 私もクールです

Reputation: 26
  • View blog
  • Posts: 1,934
  • Joined: 17-May 01

Re: leapfrog

Posted 06 November 2001 - 09:29 AM

can you post the rest of the code?
Was This Post Helpful? 0
  • +
  • -

#5 Hoe Janosh  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 06-November 01

Re: leapfrog

Posted 06 November 2001 - 09:54 AM

What planet did you get this code from? What alien beamed it to you? 'Scotty, Beam me up!'
Was This Post Helpful? 0
  • +
  • -

#6 blutrane  Icon User is offline

  • 私もクールです

Reputation: 26
  • View blog
  • Posts: 1,934
  • Joined: 17-May 01

Re: leapfrog

Posted 06 November 2001 - 11:13 PM

keep that under control...don't need none of that in here
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1