I have such a question. So I wrote a console application on C. In codeblocks, it works as it should, i.e. I / O. But when an application is opened through the executable (* .exe) in the program folder, only input is realized, and then the program just crashes.
Here is the code:
#include <stdio.h> #include <stdlib.h> int main() { int a, b, c, m; printf("Input values for comparsion: \n"); scanf("%d %d %d", &a, &b, &c); m = a; if (b < m) { m = b; } if (c < m) { m = c; } printf("Minimum is: %d\n", m); return 0; } Banal application to just deal with this problem. I tried to insert getch() both after scanf and before return .
Zero effect. Tell me, please, what's the problem?
return 0, then nothing flies, and if not, then you should write on what specific line what happens. - VTT