••Basic Tutorial••

This is my first video for this basic tutorial: https://www.youtube.com/watch?v=ylylykh8Ey8

I may not be that experienced with c++, but I am making these tutorials anyways so my friends can learn too.
Stop while you are behind. There were so many things that are wrong that your friends will be screwed if they learn from you. '#' is not "at include" it is "hash include", return 0; tells the operating system that the program exited normally without error and as of C++98, I believe, it is done by default (though it is still good practice to call it yourself). Include is just including all the iostream code into your file as though you had typed it in. system() should be avoided unless absolutely necessary. using namespace std; just tells the compiler that if there are more than one function or variable named cin/cout etc that you are using the ones in the namespace std. If I took the entire standard C++ code and changed the namespace to jrip, then I would have to do using namespace jrip;. using and namespace, just like int/char/float/etc are reserved words by the compiler and not dependant on any of the header files (which you say including iostream makes it so you can use using namespace std;). That video shows you need to worry about learning more and not about videos for your friends to learn from.

I may have misstated some things, but it is 11:44pm and I'm exhausted right now. I'm sure one of the more experienced programmers here will correct me.

[EDIT]
One thing I forgot to mention, you completely miss mentioning that the # is a pre-processor flag to the compiler telling the compiler to (for include, put the file that follows into the file; for define, to go through the code and replace the define variable name with the data it represents, etc.).
Last edited on by closed account z6A9GNh0
Topic archived. No new replies allowed.