Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #16  
Old 06-03-2004, 04:53 AM
x-scythe
Discordant
 
Join Date: Jun 2003
Posts: 449
Default

im not a c++ coder...but i know a little about it.
but wouldnt you change this:
Quote:
Originally Posted by Kambic
#include <iostream>
to:
Code:
#include <iostream.h>
once again i dont know a lot about c++ so i could be wrong...
Reply With Quote
  #17  
Old 06-03-2004, 05:14 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Nope, dont need to do that anymore..

http://www.cpp-home.com/forum/viewtopic.php?t=252
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #18  
Old 06-03-2004, 07:11 AM
x-scythe
Discordant
 
Join Date: Jun 2003
Posts: 449
Default

Trumpcard: awesome link, very informative. thanks
Reply With Quote
  #19  
Old 06-07-2004, 01:46 AM
Kambic
Sarnak
 
Join Date: May 2003
Posts: 35
Default

Quote:
Quote:
Kambic wrote:
#include <iostream>
#include <string>
using namespace std;

int main()
{
string answer;


while (answer != "Y")
{
cout << "Should Kambic be the next EQEmu Developer?" << endl;
cout << "Please type Y for 'Yes' or N for 'No':" << endl;
cin >> answer;
if (answer != "Y")
{
cout << "die irl plz" << endl;
}

}
cout << "you are teh WIN !!!" << endl;

return 0;
}
N -- Oh btw, it will always return the "you are teh WIN !!!" line because you didn't include "return 0;" in your if statement. So i r teh WIN !!!
Of course it will. But not until you answer Y. Until you answer Y to my question, the program loops endlessly. Ahh, my pressssciousss... yesssss.....
__________________
Sojourneying on the Path to Eternity...
Reply With Quote
  #20  
Old 06-07-2004, 04:09 AM
m0oni9
Hill Giant
 
Join Date: Dec 2003
Posts: 166
Default

If you enter in something like "a b c d e f g" it will read each item individually. You need to either read it all into a buffer at once, or flush the input buffer somehow between prompts.
Reply With Quote
  #21  
Old 06-07-2004, 05:17 AM
mangoo
Items Master
 
Join Date: Apr 2003
Posts: 293
Default

Didn't pay attention to the while loop statement...DIRTY
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:55 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3