Mail Archives: djgpp/1997/10/15/19:46:15
I'm just a casual programmer as well, so forgive me if everything
I say is untrue.
I don't think ^ exists as an operator in C or C++ at all, that's just
in some other languages. If I remember correctly, in the header
"math.h" there is a function pow which raises a number to the power
like this:
y = pow(3,6); // y is assigned 3 to the power of 6
y = pow(6,3); // y is assigned 6 to the power of 3
etc.
mark
>Hi. I'm just a casual programmer, so excuse me if this is a foolish
>question. I cannot get the ^ operator to work in my programs using DJGPP. It
>returns error messages basically saying it doesn't know what it is. I'll try
>something like this:
> cout << 3^2;
>and it happens. Do I have to include some weird header file, or am I just
>screwed? Any help appreciated.
>Mike
- Raw text -