M
Magix
Hi,
I have following code.
char buffer[161];
void string_addchar(char *sourc, char ch)
{
int length;
length=strlen(sourc);
sourc[length]=ch;
sourc[length+1]=0;
}
string_addchar(buffer,0xA8); // 2 warnings on this line
I will get following warning on above string_addchar statement:
warning C4305: 'argument' : truncation from 'const int' to 'char'
warning C4309: 'argument' : truncation of constant value
How should I fix that ?
I have following code.
char buffer[161];
void string_addchar(char *sourc, char ch)
{
int length;
length=strlen(sourc);
sourc[length]=ch;
sourc[length+1]=0;
}
string_addchar(buffer,0xA8); // 2 warnings on this line
I will get following warning on above string_addchar statement:
warning C4305: 'argument' : truncation from 'const int' to 'char'
warning C4309: 'argument' : truncation of constant value
How should I fix that ?