incompatible types in assignment...

hi guys :) i'm having some trouble in passing an integer to a char!!

nValue = GetDlgItemInt( hwnd, IDC_NUM1, FALSE, FALSE );
s=("Value retrieved: %d", nValue);

the error i'm getting is:

incompatible types in assignment of `UINT' to `char[200]'

i know i'm doing something really bad ^^ but don't know what it is!!
closed account (zb0S216C)
Initially, the function expected a "UINT". During the call to the function, you attempted to pass an array, which is actually an address, when the function expected an integer but got an address instead. Of course, this type of conversion is not made implicitly by the compiler and must be explicitly requested.

Last edited on
I'm guessing here (and I suppose I shouldn't).

But maybe this line
    s=("Value retrieved: %d", nValue);

should instead look like this?
    sprintf(s, "Value retrieved: %d", nValue);

thank you guys, sprintf works fine :)
Topic archived. No new replies allowed.