I'm storing them as floating point numbers. Here's a bit of the code:
class Token
{
public:
virtual float getNumber()=0;
virtual char getOperator()=0;
};
Type: Posts; User: cppn00b
I'm storing them as floating point numbers. Here's a bit of the code:
class Token
{
public:
virtual float getNumber()=0;
virtual char getOperator()=0;
};
I'm trying to write a calculator that gets its input by parsing a single line expression that includes numbers and their operators, like 1+2-3
The number and operator will both be stored in a...
I see, that makes sense, thanks
Thanks, that fixed it, but how come?
class String
{
protected:
enum {SZ = 80};
char str[SZ];
public:
String() //this is being called from Pstring's else
{str[0] = '\0';}