Creating a new project

Write your question here.
I am creating my first project and I got a file that looks like that in the code.
What does this mean?
1
2
3
4
5
6
7
 #include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
	return 0;
} Put the code you need help with here.
Those int argc, char** argv are console arguments but you probably dont have to use them so you can just ignore argc and argv or just remove them.

In Windows when you returning from this main function console automatically closes so if you don't want that to happen (so that you would be able to see the programs output if any) you can use system("pause") or some other stuff to wait for user to press anything before returning from function and closing a console.

So probably a nice solution while you are learning is just to use this
1
2
3
4
5
6
#include <iostream>

int main() {
        system("pause");
	return 0;
}


I use system("pause") all the time when doing exercises but here you can read why you should not get into a habit of using it
http://stackoverflow.com/questions/1107705/systempause-why-is-it-wrong
Last edited on
here you can read why you should get into a habit of using it

Presumably that should have been "here you can read why you should not get into a habit of using it".
Yes tnx edited!
Thank you very much Etrusks. I just deleted everything and my program works fine.
Topic archived. No new replies allowed.