gcc on Windows: generated “a.exe” file vanishes

前端 未结 8 2129
一个人的身影
一个人的身影 2021-01-12 12:01

I\'m using GCC version 4.7.1, but I\'ve also tried this on GCC 4.8. Here is the code I\'m trying to compile:

#include 

void print(int amount)         


        
8条回答
  •  花落未央
    2021-01-12 12:25

    There is no issue with your code it is just exiting properly.

    You have to run it in the command line which will show you all the info.

    start->run->cmd, then cd to your directory. then a.exe. If you don't want to do that you can add a sleep() before the return in main.

    More over, in your code when you pass print(5) to your function it's not being used.

提交回复
热议问题