Dear potatoCode
Have you been using Dev C++. Please tell me the settings from where you can run your program from the command line?
regards
Amarjit
Printable View
Dear potatoCode
Have you been using Dev C++. Please tell me the settings from where you can run your program from the command line?
regards
Amarjit
Hello amarjitamarNew,
how are you?
I did use it once but been awhile. Maybe check under Setting or Option? Sorry I can't really remember. But, if you're on windows, go to start, click on run, and type cmd in a popup dialog box to bring up the console window.
sorry couldn't be more of a help.
Can anybody provide any help.......
regards
Amarjit
Read what potatoCode wrote: "go to start, click on run, and type cmd in a popup dialog box to bring up the console window".
If you really want to simulate a pause then #include <iostream> and #include <limits>, then write:
Alternatively, set a break point and step through your code using the debugger.Code:std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
std::cin.get();
One thing i find though Turbo C++ 4.5 is an obsolete software but this problem do not arise in TC++. The output window remains active until u close it. This is really good feature i like.
I have tried with cin.get(), it dosen't work. I will try this and will tell u.
Any other compilers available that show the output much simply without such extra coding.
Any help.
Amar
Just get used to sticking a breakpoint on the main function return statement and running your code in the debugger. The link for the latest free version of msvc express is in my sig. You must have a decent compiler if you are serious about learning c++.
Of course it does, if you ignore everything that is left in the buffer before using it, as in my example.Quote:
Originally Posted by amarjitamarNew
It is not about the compiler but about the IDE. If you really want the IDE to do this for you, use say, Code::Blocks or Visual Studio.Quote:
Originally Posted by amarjitamarNew
Yes Laserlight,
Your solution seems to be working. Thank you very much..
One more thing can you tell me what the code is doing...i dont want to mug it up but know that what is going on...
As I wroter earlier: "ignore everything that is left in the buffer before using it" (it being cin.get()).Quote:
Originally Posted by amarjitamarNew
Didn't get the syntax behind the code, still thank you very much for your help.
The same suffice my requirement.
Regards
Amarjit