244
edits
mNo edit summary |
mNo edit summary |
||
| Line 362: | Line 362: | ||
For example, if you want the loop to end early when a certain condition is met, just use an if statement inside the loop and have the loop break if this condition is met. | For example, if you want the loop to end early when a certain condition is met, just use an if statement inside the loop and have the loop break if this condition is met. | ||
==Executing system commands in C++== | |||
It is possible to execute system commands from within your C++ program. If your program is command-line only, you can execute simple commands such as those to clear the screen, etc. | |||
If you're using Linux, the code is | |||
system("clear"); | |||
You can also do this if you're running Windows (although why would you want to?) The DOS clear command is "cls" | |||
system("cls"); | |||
...like so! | |||
[[Category:Helpdesk]] | [[Category:Helpdesk]] | ||
edits