|
You last visited: Today at 19:45
Advertisement
[Question] Stop Console!
Discussion on [Question] Stop Console! within the C/C++ forum part of the Coders Den category.
04/26/2013, 19:25
|
#1
|
elite*gold: 0
Join Date: Nov 2011
Posts: 719
Received Thanks: 1,342
|
[Question] Stop Console!
Hello,i'am just learning C++.
And i want to know how to stop a console while running , cause if i press 'Debug' it's closing immediately and this is my code, i already added system ("pause") but still not working any help? ^^
Source :
Code:
// C++ Hello All Tutorial by Primmo
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
cout<<"Hello All!"<<endl;
system ("pause");
return 0;
}
|
|
|
04/26/2013, 19:28
|
#2
|
elite*gold: 724
Join Date: Mar 2011
Posts: 10,479
Received Thanks: 3,318
|
std::cin.get();
Don't use system("pause");.
|
|
|
04/26/2013, 19:28
|
#3
|
elite*gold: 0
Join Date: Feb 2013
Posts: 1,137
Received Thanks: 869
|
Start with CTRL+F5 or place a breakpoint at the end - thats it.
Console applications are not supposed to stay running after execution.
|
|
|
04/26/2013, 19:30
|
#4
|
elite*gold: 0
Join Date: Nov 2011
Posts: 719
Received Thanks: 1,342
|
Quote:
Originally Posted by snow911
std::cin.get();
Don't use system("pause");.
|
Still not working :c.
|
|
|
04/26/2013, 19:43
|
#5
|
elite*gold: 104
Join Date: Oct 2012
Posts: 2,720
Received Thanks: 593
|
while(true){} :P
|
|
|
04/26/2013, 19:50
|
#6
|
elite*gold: 0
Join Date: Nov 2011
Posts: 719
Received Thanks: 1,342
|
Other suggestion ^^
Can someone re-create this source and giving me a working stop console source code ?
|
|
|
04/26/2013, 19:52
|
#7
|
elite*gold: 0
Join Date: Feb 2013
Posts: 1,137
Received Thanks: 869
|
Again:
- set a breakpoint when starting from ide
- ctrl+f5 (when using visual studio)
- start your applications within a open command prompt
Its expected behaviour of console applications to exit after the code completes.
|
|
|
04/26/2013, 19:53
|
#8
|
elite*gold: 0
Join Date: Nov 2011
Posts: 719
Received Thanks: 1,342
|
Quote:
Originally Posted by Schlüsselbein
Again:
- set a breakpoint when starting from ide
- ctrl+f5 (when using visual studio)
- start your applications within a open command prompt
Its expected behaviour of console applications to exit after the code completes.
|
Thank you , but how you mean 'Breakpoint when starting from ide , i'am very sorry but i'am just a beginner Microsoft Visual C++.
# Fixed thanks ^^.
|
|
|
04/26/2013, 20:01
|
#9
|
elite*gold: 0
Join Date: Nov 2007
Posts: 107
Received Thanks: 9
|
System pause is a great tool for starters. I still use it today.
As to why yours isn't working, I don't know. I even pasted it into visual studio on my computer and it worked.
What are you using?
|
|
|
04/26/2013, 20:02
|
#10
|
elite*gold: 0
Join Date: Nov 2011
Posts: 719
Received Thanks: 1,342
|
Quote:
Originally Posted by Quack147
System pause is a great tool for starters. I still use it today.
As to why yours isn't working, I don't know. I even pasted it into visual studio on my computer and it worked.
What are you using?
|
Microsoft Visual C++ 2010 Express , and i setted Breakpoint like that guy said and its working but closing after like 4-5 seconds , and i want it for like permantly , that it won't close till pressing a key or press enter  .
|
|
|
04/26/2013, 20:03
|
#11
|
elite*gold: 0
Join Date: Feb 2013
Posts: 1,137
Received Thanks: 869
|

click!
|
|
|
04/26/2013, 20:05
|
#12
|
elite*gold: 0
Join Date: Nov 2011
Posts: 719
Received Thanks: 1,342
|
Quote:
Originally Posted by Schlüsselbein

click!

|
Bro,its still closing ,  . Even i added Breakpoint in Ide }
|
|
|
04/26/2013, 20:05
|
#13
|
elite*gold: 0
Join Date: Feb 2013
Posts: 1,137
Received Thanks: 869
|
Quote:
|
Microsoft Visual C++ 2010 Express , and i setted Breakpoint like that guy said and its working but closing after like 4-5 seconds , and i want it for like permantly , that it won't close till pressing a key or press enter .
|
Look at programs like ping, netstat or any other popular console applications. Its the way console applications work. Its not the applications job to decide whether the console should stay open or not. It gives the responsibility back to the caller. If you want to see the output, start your app out of a open shell.
Quote:
|
Bro,its still closing , . Even i added Breakpoint in Ide }
|
Start your program with debugger _attached_ (F5 solo!) after setting the breakpoint. No debugging features without an attached debugger, conclusive mh?
|
|
|
04/26/2013, 20:06
|
#14
|
elite*gold: 0
Join Date: Nov 2007
Posts: 107
Received Thanks: 9
|
Quote:
Originally Posted by Primmo
Microsoft Visual C++ 2010 Express , and i setted Breakpoint like that guy said and its working but closing after like 4-5 seconds , and i want it for like permantly , that it won't close till pressing a key or press enter  .
|
It shouldn't do that. Try setting your breakpoint by clicking on the gray bar left of your code. It should make a red circle appear like this.
Then when you want to resume your code after it hits the breakpoint, click the play symbol. It should freeze there until you do that, if you set it correctly.
|
|
|
04/26/2013, 20:19
|
#15
|
elite*gold: 104
Join Date: Oct 2012
Posts: 2,720
Received Thanks: 593
|
Quote:
Originally Posted by Primmo
Thank you , but how you mean 'Breakpoint when starting from ide , i'am very sorry but i'am just a beginner Microsoft Visual C++.
#Fixed thanks ^^.
|
He had trolled you.. 
IDA = IDA PRO (Decompiler & Debugger)
breakpoint = debugging and a break within the programm running
|
|
|
 |
|
Similar Threads
|
(Question) Ibot stop walking...
02/01/2012 - Silkroad Online - 2 Replies
hi guys,
firstly i want to say that i already used the sufu, but noones answer was nearly correct to fix that problem.
my problem: when i click on "stop walking" on the ibot and i want to go to my trainigs area, my char stops walking every two or three steps.
so i need more than 20mins to walk to my hunting area, cz have to klick every 2 seconds for walk...
it makes me crazy xD
some people said to me, to refresh all ur skills on the ibot, which i already did, but it doesnt help...
i...
|
[Question]Console
01/04/2010 - CO2 Private Server - 2 Replies
Hey E*pvpers can you help me with this error
In the console it keeps getting lots of errors ive tryed going to the lines yes ^.^
Btw its 5119 basicly same one as 5165 cause there same source same coded stuff
And if you can help great ^^
Screen Shot:
http://i15.servimg.com/u/f15/14/45/17/86/captur10 .jpg
And heres the lines when i went there ^^
|
[QUESTION] How can I stop the hack?
11/10/2009 - Grand Chase - 10 Replies
Im using SOul's and Brain's edited scripts but now I want to play normaly for pvps and normal dungeon games and I dont know how to stop the hacking.
On the past I could just delete 1 letter at the bypass target and it stopped, but now it doesnt work.
What can I do for it?
Ty :handsdown:
|
did any hack can stop gm ask question when we boting !!!
08/08/2009 - Dragonica - 2 Replies
when i put auto attack gm ask question if no answer auto send us back to town!!!!!
|
[Question] Should I stop botting?
11/09/2008 - Silkroad Online - 12 Replies
Hey, I just started botting about 3 days ago. I got nice items and 500 silk and gold ticket etc. and the thing is that I don't want to get banned. I've read a lot about banned high lvl's who got premiums and that stuff.
I'm using agBot and I need answer that do I get banned if I get busted? I'm only lv 46..
|
All times are GMT +1. The time now is 19:45.
|
|