When I try to use the following code
value += (int)str[i];
it gives me a "Syntax error - int". I know that this conversion is done automatically, but in some other cases it is necessary to do this. I've tried the operators **, #, ##, and just (typename), but none seem to work. Is there something I'm missing, or is it not implemented yet?
Give me a case where automatic conversion doesn't cut it and I'll make it work ;)
Paul.
If I'm calling a function with variable arguments and I want it to cast a BYTE to an INT before calling, the compiler won't know that. I haven't needed it yet, but maybe someday. It also makes code easier to read, I think.
Anything less than 32 bits is sent as an INT on the stack. So when you pass a byte it still takes up 32 bits anyway.
Paul.
How about this:
m_pFile = new(byte, GetFileLength(file)+1);
I get an integer value expected error.
I realize this can be fixed with automatic casting though.