Mail Archives: cygwin/1998/07/21/03:37:02
Hi everybody..
This is the start of my code:
#include <iostream.h>
int main ()
{
int number;
char adjcoffee;
char adjdog;
char adjcat;
char adjmouse;
char adjocean;
cout << "\nChoose a number between 1 and 100:";
cin >> number;
cout << "\nGive an adjective for dog:";
cin >> adjdog;
Well, first i tried to declarate all the char, separated with "," but the
compiler warned about undeclared variables. Then, i do this way. The
problem is: When i put an adjective for dog, it jump a piece of my code.
Like this:
Choose a number between 1 and 100: 3
Give an adjective for dog: Ugly
-> this line stay empty
cat: -> dont ask for the adjective
Mouse: -> The same
Coffee: -> Hidden
Ocean: -> Ask normally
But if i put numbers, it works normally, like if i had declared a int.
What i am doing wrong???
Thanks... Oh, and one comment... Java is much easier than this...:)))
-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Home Page: http://i.am/marshall/
e-mail: marshall AT cwb DOT matrix DOT com DOT br ou marshall AT i DOT am
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -