Hi everyone. I'm working on a simple calculator program for Orbiter that runs through the Magic Black Box. I feel as though I may be doing something wrong... Can cin and cout be used in a class definition, or must they be confined to the main() function?
For example...
The part in blue is what concerns me.
For example...
Code:
//random.h
Class Random
{
RandomFunction(double a, double b);
}
Code:
//random.cpp
RandomFunction(double a, double b)
{
[COLOR=Blue]cout << "Enter a variable: \n";
cin >> a;[/COLOR]
}