0001
This commit is contained in:
28
.vscode/tasks.json
vendored
Normal file
28
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: g++ build active file",
|
||||
"command": "/usr/bin/g++",
|
||||
"args": [
|
||||
"-fdiagnostics-color=always",
|
||||
"-g",
|
||||
"${file}",
|
||||
"-o",
|
||||
"${fileDirname}/${fileBasenameNoExtension}"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "Task generated by Debugger."
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
||||
39
basics
Normal file
39
basics
Normal file
@@ -0,0 +1,39 @@
|
||||
Objectoriented programming:
|
||||
Code can be splitted into parts which can be reused again.
|
||||
Introduces classes and structures, from which objects can
|
||||
be created. Classes can contain functions which can be used
|
||||
specifically on objects of that class, to edit them.
|
||||
Makes it easier to administrate for example multiple soldiers,
|
||||
by creating multiple soldier-objects of class soldier.
|
||||
|
||||
Standards:
|
||||
Standards are used to unify software-modules, so they can be
|
||||
used on all systems which are implementing those standards.
|
||||
DIN -> Deutsches Institut fuer Normung
|
||||
ANSI -> American National Standards Institute
|
||||
STL -> Standard Template Library
|
||||
|
||||
C++:
|
||||
C++ is a programming language used to programm. It is close to
|
||||
the system, which means that it is possible to influence the
|
||||
system in a very close way.
|
||||
SDK -> Software Development Kit
|
||||
Many SDKs are optimized for C++. It also implements a functionality
|
||||
called pointers, which point to an address, where some data is
|
||||
stored. They allow fast and efficient access on that data.
|
||||
It is one of the most used programming languages to create games.
|
||||
|
||||
Preprocessor-commands:
|
||||
At compiling of programm-code, those commands marked with a hash #
|
||||
are processed first.
|
||||
|
||||
Includes:
|
||||
Includes are preprocessor-commands which allow to include already
|
||||
existing code into your project. For example the iostream library
|
||||
contains code to read and write from and to console.
|
||||
If you want to include libraries from the working-directory, you
|
||||
have to use "lib" and the compiler will be looking there for the libs.
|
||||
If you want to use libraries from a special directory, specified by
|
||||
the include path of the compiler, you have to use <lib>.
|
||||
Example: #include <iostream>
|
||||
|
||||
BIN
exercises/exercise00
Executable file
BIN
exercises/exercise00
Executable file
Binary file not shown.
24
exercises/exercise00.cpp
Normal file
24
exercises/exercise00.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* @file exercise00.cpp
|
||||
* @author Wicked Jack ()
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-07-26
|
||||
*
|
||||
*/
|
||||
|
||||
//This is a one line comment
|
||||
/**
|
||||
* This
|
||||
* is
|
||||
* a
|
||||
* multiline
|
||||
* comment.
|
||||
*/
|
||||
#include <iostream> //Include library which contains cout to print string to console.
|
||||
using namespace std; //Allows to shorten some writing, instead of writing std::cout we can write cout.
|
||||
int main() //main-function, returns int-value
|
||||
{
|
||||
cout << "Hello World\n"; //Print string to console
|
||||
return 0; //Return code
|
||||
}
|
||||
Reference in New Issue
Block a user