User forums > Using Code::Blocks

New to C++ : How to pause program

(1/1)

jayesh29:
Hi,

I'm a complete beginner to C and C++ programming (Started yesterday) and I'm really sorry if this has been asked before but I have looked everywhere on the internet and I just can't seem to fix this.

When I build and run my program in CodeBlocks, it works perfectly and asks me to press a key before it exits, however, when I try to run the main file from the project folder, after the program runs, it closes very quickly. Other forums suggest I use the system("pause") or Cin before return but it isn't working.

Would really appreciate a reply and once again apologies if this is a redundant/dumb question.

Jenna:
PLease (re-)read the forum rules and follow them !!

Topic locked !

Navigation

[0] Message Index

Go to full version