English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I mean - to exit the main function fron a function that it operates, without going thru all the returns on the way, just terminate the programm. is it possible?

thanks...

2007-03-14 22:58:27 · 4 answers · asked by Ilham Aliyev 2 in Computers & Internet Programming & Design

4 answers

yes use exit(-1);

2007-03-14 23:03:27 · answer #1 · answered by Anonymous · 0 0

You could use "break;" to move out of a loop or a function. After that, a key press would eliminate the program.
You can also use exit(), or exit(0) to terminate without condition.

2007-03-14 23:06:58 · answer #2 · answered by abhas1 3 · 0 0

i visit assum which you have a terminal window, or you're sitting in front of a linux computing device. when you have logged in you will the two be dealing with a terminal window or a computer. in case you spot a computer locate a thank you to start a terminal. interior the terminal you will possibly be able to desire to apply a text textile editor. for some years people have argued that's extra clever vi or emacs, yet now there are others. interior the terminal on the command line style "vi helloworld.cpp" or "emacs helloworld.cpp" or "xemacs helloworld.cpp" or "vim helloworld.cpp" or "gedit hellowrold.cpp" or "nano helloworld.cpp". All of those are occasion of text textile editor in unix. Gedit is like abode windows notepad, and there are menus to keep archives. In vi and vim it is not as obtrusive, it rather is the single that i take advantage of the main in view which you do no longer might desire to waste time touching your mouse. Whe vi starts off you will see a clean demonstrate screen press i to be in interactive mode. style your code, and hist esc : w q this escapes you from interactive mode, and then writes and extremely vi or vim. In xemacs and emacs you need to use the mouse like notepad. In nano the instructions are on the bottome of the demonstrate screen. i'm hoping this helps.

2016-10-18 10:36:38 · answer #3 · answered by Anonymous · 0 0

use exit(0) .... defined in process.h

2007-03-14 23:17:05 · answer #4 · answered by ? 2 · 0 0

fedest.com, questions and answers