ZoneAye
Known Member
- Messages
- 12
- Reaction score
- 5
- Points
- 118
whats up you lil fart sniffs this is my first C++ tut i have deiced not to do C as people usually use C++ for console dev etc and am guessing thats why you are learning.
In this tutorial i will go over the cout function its sooooo easy. Its used to output stuff to the console like numbers, text etc so before we begin u will need a ide that can compile C++ code i would recommend Visual studio either 2010 if you want to make stuff in xexs or 2015 if you want to make your code look noice. so lets begin below is a very simple C++ program all it does it out put Hello world to to the console
#include <isostream> // from the C++ library
using namespace std; // tells compiler that your program is in C++
same with the define
// this is called the main function every other function u write must be linked to this main one or it will not run i will go over functions later.
// the {} are used to open and close the function and everything between them are called statements
int main()
{
// first thing this line does is outputs "Hello World" then sends anything after it to a new line use endl to make a new line.
cout << "Hello World" << endl;
// this line just waits for the user to enter a key u can also use getchar(); but i like to use system
system("PAUSE");
}
that is my first C++ tut hope you liked it
if you want try make a program that prints out your name and age on separate lines i will put the answer in the comments tomorrow![Smile :smile: :smile:](/styles/default/xenforo/smilies.emoji/people/slight_smile.emoji.svg)
In this tutorial i will go over the cout function its sooooo easy. Its used to output stuff to the console like numbers, text etc so before we begin u will need a ide that can compile C++ code i would recommend Visual studio either 2010 if you want to make stuff in xexs or 2015 if you want to make your code look noice. so lets begin below is a very simple C++ program all it does it out put Hello world to to the console
#include <isostream> // from the C++ library
using namespace std; // tells compiler that your program is in C++
same with the define
// this is called the main function every other function u write must be linked to this main one or it will not run i will go over functions later.
// the {} are used to open and close the function and everything between them are called statements
int main()
{
// first thing this line does is outputs "Hello World" then sends anything after it to a new line use endl to make a new line.
cout << "Hello World" << endl;
// this line just waits for the user to enter a key u can also use getchar(); but i like to use system
system("PAUSE");
}
that is my first C++ tut hope you liked it
if you want try make a program that prints out your name and age on separate lines i will put the answer in the comments tomorrow