0
這是我朝的main()的結束代碼:用C奇怪的堆棧錯誤錯誤在Visual Studio
printf("Would you like to find data on another 20 rods? \nType C and press enter to continue, or type E and press enter to exit \n");
scanf("%s",&exitOption);
if (exitOption == 'C'){
main();
}
return 0;
我每次運行該程序我得到這個錯誤:
爲什麼?我該如何解決它?
什麼'exitOption'的定義是什麼? –
你也應該知道[遞歸到main()](http://stackoverflow.com/questions/4518598/is-it-legal-to-recurse-into-main-in-c)是未定義的行爲。 – WhozCraig