From 89a7b41a69821bf39cc3ed16b46f3831dfec72a8 Mon Sep 17 00:00:00 2001 From: WickedJack99 Date: Wed, 27 Jul 2022 20:01:04 +0200 Subject: [PATCH] 0002 added descriptions[namespaces, main, cout, escape-signs] --- basics | 32 ++++++++++++++++++++++++++++++++ exercises/exercise00 | Bin 32728 -> 32752 bytes 2 files changed, 32 insertions(+) diff --git a/basics b/basics index 8937800..1140b3d 100644 --- a/basics +++ b/basics @@ -37,3 +37,35 @@ If you want to use libraries from a special directory, specified by the include path of the compiler, you have to use . Example: #include +Namespaces: +Namespaces are named spaces, which can include functions and variables. +They can help to seperate different modules with equal function- or variable- +names. To use a function or variable of a specififc namespace use +namespace::variablename or namespace::functionname. Namespaces help to avoid +conflicts between modules which are programmed by different people. + +main-function: +Every programm needs a main-function, which serves as the entrance-point of +the programm. The main-function returns 0 if there was no error, as default +we always return 0. The curled paranthesis {} mark the content of the function. + +cout: +Function from library iostream at namespace std, which is used to print messages +to the console. +Example: cout << "Message" << endl; +endl stands for end of line. + +Escape-signs: +Escape-signs are used to display some special characters like spaces, tabs, etc. +They can be used at strings (char-arrays) and are indicated by a backward-slash. +Examples: +\n -> Carriage Return +\t -> horizontal tab +\v -> vertical tab +\r -> return to beginning of collumn +\b -> jump back by one sign +\" -> insert "-sign +\\ -> insert backslash +\a -> plays signal-sound + +Variables: diff --git a/exercises/exercise00 b/exercises/exercise00 index fa922eed78e1161fa341db43ff886c4e08a2c4a5..fefbf65ebb956f104d99e3cf6db10cf1122be563 100755 GIT binary patch delta 402 zcmWm9&nv@W90%~{^L)P#+oG9$58DZ)My)ocl*{6>o1ZD1R+_%76yJs%_Eppphi@K< z6yhKbGS8gsASVZZz%Dx|IWXZsaWJ3H;r;6Uyz8mwDOKU43Qikb=GzA}!+cxVDZEBj z%7>rw#S25n7vfKCYL&3o#hC1k2Gw@-y#@SoZTJohl^EIM5Kxb!0nJ`yjBQ{Fm@?)Y z(+rIDU=kP(P23wYaRq|S&}Jbli)cAScZe}~_x%b#pF RBxQ#k2UE_WeKK!{{s9bOR4o7i delta 413 zcmXBPPbh<790%~{_x#!3wyA{X~M8MT{hoA}mC1QrkhyLuw}oSHMi3^U)_5Yf^Pt zWIZ