-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_1_Introduction.cpp
More file actions
79 lines (68 loc) · 4.57 KB
/
Copy path_1_Introduction.cpp
File metadata and controls
79 lines (68 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// ===========================================================================
/// <summary>
/// _1_Introduction.cpp
/// CplusPlus
/// created by Mehrdad Soleimanimajd on 20.12.2018
/// </summary>
/// <created>ʆϒʅ, 20.12.2018</created>
/// <changed>ʆϒʅ, 02.07.2023</changed>
// ===========================================================================
#include "CplusPlus.h"
#ifdef _WIN32
#include "Console.h"
#elif defined __APPLE__
#include "Terminal.h"
#endif
void _01_01_Introduction ()
{
try
{
ColourCouter (" -------------------------------------------------", F_bRED);
ColourCouter ("--------------------------------------------------\n\n", F_bRED);
//! ####################################################################
//! ~~~~~ C++ language:
// over the years evolution of C++ language held itself constant.
// therefore having a compiler with the ability to support the most recent feature is self-explanatory.
ColourCouter ("~~~~~ C++ Language:\n", F_bPURPLE);
ColourCouter ("The constant evolution of the C++ language over the years, make the use of a compiler with support for the most recent feature self-explanatory.\n\n", F_YELLOW);
//! ####################################################################
//! ----- C++ compilers:
// rewriting the code in high-level language to machine language happens with the help of special programs called compilers, interpreters or assemblers based on the type of the high level language.
// C++ language is designed to be a compiled language, therefore its code generally get translated into machine language, which results to a highly efficient program.
// for this purpose, a set of tools, known as development toolchain, are needed, whose core are a compiler and its linker.
ColourCouter ("----- C++ Compilers:\n", F_bPURPLE);
ColourCouter ("The compilers job are to rewrite the code in higher level language into machine language, which have been built into various programming applications\n\n", F_YELLOW);
//! ####################################################################
//! ----- console programs:
// the fact of easy interaction, simple implementation and identical behaviour of console programs across all platforms make them very useful to learn the basics of a programming language.
// the programmer's decision to use a particular tool defines the way, in which a console program get compiled.
ColourCouter ("----- Console Programs:\n", F_bPURPLE);
ColourCouter ("They are programs that use characters to communicate with user and their environment i.e. printer, keyboard etc.\n\n", F_YELLOW);
//! ####################################################################
//! ----- IDE:
// generally several development tools get integrated in an IDE, which includes a text editor and tools to compile the program directly.
// some free IDE's:
// ---------------------------------------------
// IDE Platform
// ---------------------------------------------
// Code::blocks Windows/Linux/MacOS
// ---------------------------------------------
// Visual Studio Express Windows
// ---------------------------------------------
// Dev-C++ Windows
// ---------------------------------------------
ColourCouter ("----- IDE:\n", F_bPURPLE);
ColourCouter ("The easiest way for a beginner is to use an Integrated Development Environment (IDE).\n\n", F_YELLOW);
//! - in addition:
// if there is a Linux or Mac environment with development features at disposal, with including the C++11 flags in the command for the compiler, any code could be compilable.
// ===========================================================================--------------------------
// IDE Platform Command
// ===========================================================================--------------------------
// GCC Linux, among others... g++ -std=c++0x example.cpp -o example_program
// ===========================================================================--------------------------
// Clang OS X, among others... clang++ -std=c++11 -stdlib=libc++ example.cpp -o example_program
// ===========================================================================--------------------------
} catch (const std::exception&)
{
}
}