What is C++
c++ language tutorials androwep

C++ Standard Libraries

Properly written C++ programs have a particular structure. The syntax must be correct, or the compiler will generate error messages and not produce executable machine language. This chapter introduces C++ by providing some simple example programs and associated fundamental concepts. Most of the concepts presented in this chapter are valid in many other programming languages as well.

File: main.cpp

#include <iostream>  
using namespace std;  
int main() {  
   cout << "Hello C++ Programming";  
   return 0;  
}

Variations of our simple program

#include <iostream>
using std::cout;
int main() {
cout << "This is a simple C++ program!\n";
}

The using directive in allows us to use a shorter name for the std::cout printing object. We can omit the std:: prefix and use the shorter name, cout. The name std stands for “standard,” and the std prefix indicates that cout is part of a collection of names called the standard namespace.

#include <iostream>
using namespace std;
int main() {
cout << "This is a simple C++ program!\n";
}

Template for simple C++ programs

std::cout definition from into our program. Depending on what we need our program to do, we may need additional #include directives.

Can I teach myself C++?

As you can consider to learn almost any programming language by yourselfC++ is one of the more complex language you can find.


Do you know Bangla Follow – BNCODEING

Do not have CSE skill – BSCINCSE