Before I say what I must say, this "bug" has been apparent throughout all the minor 10.0.* releases, and the original dev tools CD that comes with OS X as well as that installed with the dev tools update that's been out a few days as of today.
#include <iostream.h>
int main()
{
int a;
cout << "Enter a new value for a: ";
cin >> a;
return 0;
}
This program, when compiled with the apple devtools in c++ (in the term or the IDE), wont work as expected (seeing the value message, and then entering a new value for a). It works, actually, quite backwards from how you think it should. It gets the user input and THEN outputs the message, which *should* have come before the input. Am I doing something wrong? I've tested a ton of different methods of placing functions between the statements, and nothing seems to work. Good old printf and scanf work, but I love OO code too much to back away from it.
(I would rather be using -> 10 million times, in size 9 monaco, watching little ants of code blaze fire across the screen, but I can't stand this annoying bug.)
#include <iostream.h>
int main()
{
int a;
cout << "Enter a new value for a: ";
cin >> a;
return 0;
}
This program, when compiled with the apple devtools in c++ (in the term or the IDE), wont work as expected (seeing the value message, and then entering a new value for a). It works, actually, quite backwards from how you think it should. It gets the user input and THEN outputs the message, which *should* have come before the input. Am I doing something wrong? I've tested a ton of different methods of placing functions between the statements, and nothing seems to work. Good old printf and scanf work, but I love OO code too much to back away from it.
(I would rather be using -> 10 million times, in size 9 monaco, watching little ants of code blaze fire across the screen, but I can't stand this annoying bug.)