I've tried adding the name of some countries into country list. So I have to allocate a layered address of char (pointer) to do this properly. And run the program... Crash !!! We are sorry about this inconvenience...??????
No compling & linking errors & warnings, why this caused??
I'm don't know how to make my code become correct. Perhaps something in my code makes my program sad and... cry !!!
// What are your favorite countries?
char ** strCountrylist;
char strInp; //Input
int nCount = 0;
bool bAllow = true; //Allows to continue parsing (inputing) or not
strCountrylist = newchar*; //allocating the buffer
// Start the interview
printf("Your favorite country :");
if(!stricmp(strInp, "none"))bAllow = false;
//printing the results
printf("Your favorite countries you have added :");
for(int i = 0; i < nCount;i++)
And... It's.. Crashed !!!
Does anyone know this crash?? The code seems is wrong somewhere.
I haven't seen this error before so I don't know how to solve it...