Dear fellow coders,
I can't seem to understand why im getting tun-time problems with the following code snippet:
Please guide me.
Thanks in advance.
Kunal.
I can't seem to understand why im getting tun-time problems with the following code snippet:
Code:
int main()
{
char* s = 0;
char fubar[] = { "fubar" };
strcat( s, " fubar " ); // troublesome line
strcpy( s, " fubar " ); // troublesome line
strcat( s, fubar[] ); // troublesome line
strcpy( s, fubar[] ); // troublesome line
return 0;
}
Please guide me.
Thanks in advance.
Kunal.