Skip to main content

C++ programming



#include <iostream>

using namespace std;

int main(){

 cout << "Hello world" << endl;

 return 0;
}

OR

#include <iostream>

using namespace std;

int main(){

 cout << "Hello world" ;

 return 0;
}

Explanation 

#include <iostream> are also called per-processor directives which includes files that the computer needs to run later in the program.

using namespace std; is a standard library.
A standard library in computer programming is the library made available across implementations of a programming language.

int stands for integer.

int main( ){
return 0; } this stands for functions. Functions are things a programmer wants the computer to do. they are made up of statements which ends up with " ; ".

Popular posts from this blog

Best chess matchup: Peaceful_Moon_4D vs IM Toro123

Master Excel: Unleash Pro-Level Skills with These Tips and Tricks

Introduction to strings

Fundamental types represent the most basic types handled by the machines where the code may run. But one of the major strengths of the C++ language is its rich set of compound types, of which the fundamental types are mere building blocks. An example of compound type is the string class. Variables of this type are able to store sequences of characters, such as words or sentences. A very useful feature! A first difference with fundamental data types is that in order to declare and use objects (variables) of this type, the program needs to include the header where the type is defined within the standard library (header <string> ): // my first string #include <iostream> #include <string> using namespace std; int main () { string mystring; mystring = "This is a string" ; cout << mystring; return 0; }   printout:   This is a string As you can see in the previous example, strings can be initialized with any valid string l...