[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 148 KB, 550x550, 1313502075588.jpg [View same] [iqdb] [saucenao] [google]
3879669 No.3879669 [Reply] [Original]

programming noob here. just started using Code::Blocks 10.05 a few hours ago but i have a problem. i'm trying to export a basic console application but every time i try to run it from the folder it's exported to it just closes after a fraction of a second. i can't even get the default hello world to run.

anyone know how to fix this?
>inb4 delete system32

>> No.3879673

what the fuck is code blocks

try starting it from a terminal

>> No.3880109

If you double click it, it will open a terminal, run your program, and close the terminal when your program is done.

If you want to see the output of your program, open a terminal, navigate to your folder and run the program in the terminal. Or code it so it waits for input before exiting.

>> No.3880112

use linux

>> No.3881338

I must have seen almost exactly the same question half a dozen times now. I'm not sure who is dumber: the people who use Code::Blocks, or the people who wrote it.

>> No.3881358

This happens to everyone. The program terminates once it reaches its end. Try adding something before the return statement, maybe cin.get(); I think that works.