I had an error in my code and I distilled it down to this: Could somebody tell me why the following program claims that p is being used uninitialized?
[code=cpp]
#include <iostream>
int main()
{
char *p; // error: p is being used uninitialized
// char p[10]; // no problem if we do this instead
strcpy(p,"Hello ");
return 0;
}
[/code]
[code=cpp]
#include <iostream>
int main()
{
char *p; // error: p is being used uninitialized
// char p[10]; // no problem if we do this instead
strcpy(p,"Hello ");
return 0;
}
[/code]
Comment