|
| 12 May 2013 02:39 PM |
when I open my file in VB C++ 2010, it opens, then immediately closes.
I heard adding pause; at the end works, but it doesnt, just gives an error o_e
cout << "This Is My Siggy" << endl; return 0; |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 12 May 2013 02:42 PM |
This is called 'blocking', where your program will close because it has reached the end of it's track. Basically, you returned from main, stopped all the threads of your program etc.
For example, placing an (operating system specific) pause request (which will be the same as the batch/bash/whatever command) will stop the application until it returns to main and closes. |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 02:57 PM |
| Make a runtime loop instead of the program just ending? |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 03:14 PM |
| Use cin to wait for user input before ending. |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 03:21 PM |
Prehistoricman,
Why write software that requires the user to provide useless input before the software's termination? |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 04:00 PM |
@Regular For debugging purposes when creating Win32 Console Applications, silly. |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 12 May 2013 04:09 PM |
how about jarva inb4someonemakesajokethatitssoslowyoudontevenneedawhileloop |
|
|
| Report Abuse |
|
|
mourir
|
  |
| Joined: 31 Jan 2013 |
| Total Posts: 878 |
|
|
| 12 May 2013 04:09 PM |
AbsoluteLOL,
That wouldn't require user input. |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 04:10 PM |
how about c# inb4somesaysitsucksandiprovethemwrongbecauseican |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 04:28 PM |
std::cout << "Press Enter to continue\n"; std::cin; |
|
|
| Report Abuse |
|
|
|
| 12 May 2013 04:30 PM |
while (true) { std::cout << "SPAM SPAM SPAM SPAM SPAM SPAM SPAM" << endl; } |
|
|
| Report Abuse |
|
|
booing
|
  |
| Joined: 04 May 2009 |
| Total Posts: 6594 |
|
|
| 12 May 2013 04:52 PM |
| JOptionPane.showMessageDialog(null, "I'm a pretty box."); |
|
|
| Report Abuse |
|
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
|
| 13 May 2013 06:28 AM |
include conio.h
And I use _getche(); |
|
|
| Report Abuse |
|
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
|
| 13 May 2013 06:29 AM |
@AbsoluteLOL: C#>decompilable>bad |
|
|
| Report Abuse |
|
|
Zars26
|
  |
| Joined: 27 Mar 2013 |
| Total Posts: 3 |
|
|
| 13 May 2013 09:52 AM |
| It's not working correctly, Nairod7. |
|
|
| Report Abuse |
|
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
|
| 13 May 2013 09:59 AM |
@Zars:
Ah? What do you mean? |
|
|
| Report Abuse |
|
|
| |
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
|
| 13 May 2013 04:28 PM |
@AbsoluteLOL:
De4dot can deobfuscate Dotfuscator. |
|
|
| Report Abuse |
|
|
lombardo2
|
  |
| Joined: 30 Nov 2008 |
| Total Posts: 1604 |
|
|
| 13 May 2013 04:37 PM |
| I use system("pause"); Works on windows. |
|
|
| Report Abuse |
|
|
|
| 13 May 2013 04:42 PM |
lombardo2,
There are many reasons why the use of that function should be avoided. |
|
|
| Report Abuse |
|
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
|
| 13 May 2013 04:44 PM |
system() isn't safe.
cplusplus/articles/j3wTURfi/ |
|
|
| Report Abuse |
|
|