Re: char error message by CheckAbdoul
CheckAbdoul
Wed Jul 30 13:28:52 CDT 2003
Hi Sean,
You can store only a single character in a variable of type
'unsigned char'. Since you are trying to copy more than a single character,
you need to redefine your variable type to a char array. Try the following
unsigned char logout[MAX_PATH] = {0};
strcpy(logout,"Log File opened.\r\n");
--
Cheers
Check Abdoul [ VC++ MVP ]
-----------------------------------
"Sean Whitesell" <seanw@vigoris.net> wrote in message
news:003601c356c2$f6409e60$a601280a@phx.gbl...
> I get this error,
> cannot convert parameter 1 from 'unsigned char' to 'char
> *'
>
> when I do
> strcpy(logout,"Log File opened.\r\n");
>
> logout is defined as
> unsigned char logout;
>
> What do I need to do to resolve this? I'm just learning
> C++ so I need help getting into the right direction with
> this.
>
> Thanks.