0
0

This hasn’t got anything to do with the FMOD, but I’m trying to use strings and every time I keep getting an error message implying that I cannot convert a string to an const unsigned *.

I thought a string was a pointer. I thought pointers could be passed as strings automatically if you put an asterisk * in front of the variable. Maybe I’m just not using the right #includes, but something is incredibly wrong with my compiling environment. I cannot use strings except for the ones that my application wizard set up. Yes, I do declare the strings, I tried every damned string type (from const char * to char to LPCTSTR and beyond) and still I couldn’t get anywhere.

Does anyone know what I should do to get API calls to accept strings without spewing this error all the time?

Any help would be appreciated.

Thanks
Ben

  • You must to post comments
0
0

Hi Brett,

I got that working, but I was trying to call the OutputDebugString with the filename as the string and it refused to accept the string. Instead it gave me the compiler error I described.

Not sure what causes this error, I think it’s something to do with types/pointers, but I seem to get it with Windows APIs that I’m trying to call. Not sure what to do to resolve it. Only seems to be a problem with strings. I know it’s something that can be easily fixed, but I just don’t know what I’m doing wrong.

Thanks
Ben

  • You must to post comments
0
0

Try calling OutputDebugStringA (the ANSI version) instead of OutputDebugString (which is probably resolving to the Unicode version).

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.