Programming languages are similar to human languages. They consist of words (quite few), punctuation marks, mathematical operations, and have writing rules. Programs running on any computer have been written in a programming language. There are numerous programming languages, such as C, C++, Pascal, Java, Python, PHP, Javascript, etc.
A program written in a programming language is called source code and needs to be translated into a language understood by the processor, called machine code, or executable program. For certain programming languages, the translation process is called compilation (as in the case of C, C++, Pascal, etc.), while for other languages (PHP, Python, Javascript, etc.) the translation process is called interpretation. The translation is done by a specialized program called a compiler or interpreter.
How do we write a C++ program? We need at least a text editor for writing the source and a C++ compiler. Although the source file can be created with any text editor, most of the time we use an IDE.
A widely used IDE for C/C++ is Code::Blocks or Visual Studio.
An example of C++ code would be as follows:
// A simple program in C++
#include < iostream >
using namespace std;
int main()
{
cout << "Hello, world!" << endl;
return 0;
}
In this section you can generate a summary of the page content using AI! Feel free to use the button below whenever you are in a hurry and don't have time to learn everything!
In this section you can ask our expert robot anything related to the questions you encountered during the lessons! Feel free to use the button below whenever you need additional explanations!