diff --git a/TE2/Casting/.cproject b/TE2/Casting/.cproject new file mode 100644 index 0000000..c03a97a --- /dev/null +++ b/TE2/Casting/.cproject @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/Casting/.gitignore b/TE2/Casting/.gitignore new file mode 100644 index 0000000..3df573f --- /dev/null +++ b/TE2/Casting/.gitignore @@ -0,0 +1 @@ +/Debug/ diff --git a/TE2/Casting/.project b/TE2/Casting/.project new file mode 100644 index 0000000..800ea26 --- /dev/null +++ b/TE2/Casting/.project @@ -0,0 +1,27 @@ + + + Casting + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/TE2/Casting/.settings/language.settings.xml b/TE2/Casting/.settings/language.settings.xml new file mode 100644 index 0000000..0973514 --- /dev/null +++ b/TE2/Casting/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/Casting/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/TE2/Casting/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000..2d4ca79 --- /dev/null +++ b/TE2/Casting/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,13 @@ +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/CPATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/CPATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/CPLUS_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/CPLUS_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/C_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/C_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/append=true +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/appendContributed=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/LIBRARY_PATH/delimiter=; +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/LIBRARY_PATH/operation=remove +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/append=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1560831979/appendContributed=true diff --git a/TE2/Casting/.settings/org.eclipse.core.resources.prefs b/TE2/Casting/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/TE2/Casting/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/TE2/Casting/Casting.cpp b/TE2/Casting/Casting.cpp new file mode 100644 index 0000000..27166b6 --- /dev/null +++ b/TE2/Casting/Casting.cpp @@ -0,0 +1,25 @@ +#include +using namespace std; +/* ES sind 4 Casting-Arten in C++: + * 1. static_cast: für primitive Variable + * 2. dynamic_cast: Downcasting von einem Basisklassenzeiger zu einem abgeleiteten Klassenzeiger. Zur Laufzeit wird überprüft + * ,ob die Umwandlung gültig ist. + * 3. const_cast:wird verwendet, um die const- oder volatile-Qualifizierer von einem Zeiger oder einer Referenz zu entfernen oder hinzuzufügen. + * 4. reinterpret_cast: wird verwendet, um einen Zeiger oder eine Referenz in einen anderen, möglicherweise nicht verwandten Typ umzuwandeln + * + */ + +int main() { + double d = 9.78; + + //traditionelle Methode des Castings + int x = (int) d; + cout<<"Die traditionelle Methode des Castings: " << x <(d); + cout<< "Die modernere und bevorzugte Methode des Castings: " << i; + + return 0; +} diff --git a/TE2/Einführung/.cproject b/TE2/Einführung/.cproject new file mode 100644 index 0000000..9d83880 --- /dev/null +++ b/TE2/Einführung/.cproject @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/Einführung/.gitignore b/TE2/Einführung/.gitignore new file mode 100644 index 0000000..3df573f --- /dev/null +++ b/TE2/Einführung/.gitignore @@ -0,0 +1 @@ +/Debug/ diff --git a/TE2/Einführung/.project b/TE2/Einführung/.project new file mode 100644 index 0000000..5df1c0f --- /dev/null +++ b/TE2/Einführung/.project @@ -0,0 +1,27 @@ + + + Einführung + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/TE2/Einführung/.settings/language.settings.xml b/TE2/Einführung/.settings/language.settings.xml new file mode 100644 index 0000000..205daed --- /dev/null +++ b/TE2/Einführung/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/Einführung/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/TE2/Einführung/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000..679a945 --- /dev/null +++ b/TE2/Einführung/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,13 @@ +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/CPATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/CPATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/CPLUS_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/CPLUS_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/C_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/C_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/append=true +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/appendContributed=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/LIBRARY_PATH/delimiter=; +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/LIBRARY_PATH/operation=remove +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/append=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.1685675668/appendContributed=true diff --git a/TE2/Einführung/.settings/org.eclipse.core.resources.prefs b/TE2/Einführung/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/TE2/Einführung/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/TE2/src/TE2.cpp b/TE2/Einführung/Einführung.cpp similarity index 90% rename from TE2/src/TE2.cpp rename to TE2/Einführung/Einführung.cpp index f6059ff..99f8f7a 100644 --- a/TE2/src/TE2.cpp +++ b/TE2/Einführung/Einführung.cpp @@ -1,9 +1,6 @@ - -// Inkludiere den Input-Output-Stream für das Programm +//Inkludiere den Input-Output-Stream für das Programm #include using namespace std; - - /* * - cout: steht für (Ausgabe) // prints !!!Hello World!! * - cin : steht für (Eingabe) @@ -20,3 +17,5 @@ int main() { // Gibt an, dass das Programm beendet wurde. return 0; } + + diff --git a/TE2/Eingabe/.cproject b/TE2/Eingabe/.cproject new file mode 100644 index 0000000..b8a1df0 --- /dev/null +++ b/TE2/Eingabe/.cproject @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/Eingabe/.gitignore b/TE2/Eingabe/.gitignore new file mode 100644 index 0000000..3df573f --- /dev/null +++ b/TE2/Eingabe/.gitignore @@ -0,0 +1 @@ +/Debug/ diff --git a/TE2/Eingabe/.project b/TE2/Eingabe/.project new file mode 100644 index 0000000..0050f4b --- /dev/null +++ b/TE2/Eingabe/.project @@ -0,0 +1,27 @@ + + + Eingabe + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/TE2/Eingabe/.settings/language.settings.xml b/TE2/Eingabe/.settings/language.settings.xml new file mode 100644 index 0000000..094fd8c --- /dev/null +++ b/TE2/Eingabe/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/Eingabe/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/TE2/Eingabe/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000..3723800 --- /dev/null +++ b/TE2/Eingabe/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,13 @@ +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/CPATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/CPATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/CPLUS_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/CPLUS_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/C_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/C_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/append=true +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/appendContributed=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/LIBRARY_PATH/delimiter=; +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/LIBRARY_PATH/operation=remove +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/append=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.18147023/appendContributed=true diff --git a/TE2/Eingabe/.settings/org.eclipse.core.resources.prefs b/TE2/Eingabe/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/TE2/Eingabe/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/TE2/Eingabe/Eingabe.cpp b/TE2/Eingabe/Eingabe.cpp new file mode 100644 index 0000000..48f913d --- /dev/null +++ b/TE2/Eingabe/Eingabe.cpp @@ -0,0 +1,18 @@ + +#include +using namespace std; + +int main(){ + double x ; + string c ="Noch ein Text"; + cout<< "Eingabe zahl"<< endl; + + cin >> x ; + cout<< "Die zahl " << x << c << endl; + + return 0; +} + + + + diff --git a/TE2/EscapeSequence/.cproject b/TE2/EscapeSequence/.cproject new file mode 100644 index 0000000..6b42a0b --- /dev/null +++ b/TE2/EscapeSequence/.cproject @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/EscapeSequence/.gitignore b/TE2/EscapeSequence/.gitignore new file mode 100644 index 0000000..3df573f --- /dev/null +++ b/TE2/EscapeSequence/.gitignore @@ -0,0 +1 @@ +/Debug/ diff --git a/TE2/EscapeSequence/.project b/TE2/EscapeSequence/.project new file mode 100644 index 0000000..b994872 --- /dev/null +++ b/TE2/EscapeSequence/.project @@ -0,0 +1,27 @@ + + + EscapeSequence + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/TE2/EscapeSequence/.settings/language.settings.xml b/TE2/EscapeSequence/.settings/language.settings.xml new file mode 100644 index 0000000..8855d74 --- /dev/null +++ b/TE2/EscapeSequence/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/EscapeSequence/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/TE2/EscapeSequence/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000..f940611 --- /dev/null +++ b/TE2/EscapeSequence/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,13 @@ +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/CPATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/CPATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/CPLUS_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/CPLUS_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/C_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/C_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/append=true +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/appendContributed=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/LIBRARY_PATH/delimiter=; +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/LIBRARY_PATH/operation=remove +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/append=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.236717990/appendContributed=true diff --git a/TE2/EscapeSequence/.settings/org.eclipse.core.resources.prefs b/TE2/EscapeSequence/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/TE2/EscapeSequence/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/TE2/EscapeSequence/EscapeSequence.cpp b/TE2/EscapeSequence/EscapeSequence.cpp new file mode 100644 index 0000000..2aa7e7e --- /dev/null +++ b/TE2/EscapeSequence/EscapeSequence.cpp @@ -0,0 +1,35 @@ +#include +using namespace std; + +/* + * - wenn man Zeichenketten verwendet, die spezielle Zeichen enthalten müssen, wie z.B. Zeilenumbrüche, + * Tabulatoren, oder wenn man besondere Zeichen (wie Anführungszeichen) in einer Zeichenkette verwenden möchte. + */ + +int main() { + + //1. \n: Neue Zeile + cout << "Hallo\nWelt!" << endl; + cout << " " << endl; + //2. \t: Horizontaler Tabulator (Trennung) + cout << "Name\tAlter\tOrt" << endl; + cout << " " << endl; + //3. \\ - Backslash + cout << "This is a backslash: \\" << endl; + cout << " " << endl; + + /* + * 4. löscht was vor dem \ r + * "H" wird durch "W" ersetzt. + * "e" wird durch "o" ersetzt. + * "l" wird durch "r" ersetzt. + * "l" wird durch "l" ersetzt. + * "o" wird durch "d" ersetzt. + * + */ + cout << "Hello\rWorld" << endl; + //Löscht das vorhergehende Zeichen in der Zeichenkette. + cout << "12345\b6" << endl; + + return 0; +} diff --git a/TE2/Variables vs Data type/.cproject b/TE2/Variables vs Data type/.cproject new file mode 100644 index 0000000..7e8be74 --- /dev/null +++ b/TE2/Variables vs Data type/.cproject @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/Variables vs Data type/.gitignore b/TE2/Variables vs Data type/.gitignore new file mode 100644 index 0000000..3df573f --- /dev/null +++ b/TE2/Variables vs Data type/.gitignore @@ -0,0 +1 @@ +/Debug/ diff --git a/TE2/Variables vs Data type/.project b/TE2/Variables vs Data type/.project new file mode 100644 index 0000000..7f746f8 --- /dev/null +++ b/TE2/Variables vs Data type/.project @@ -0,0 +1,27 @@ + + + VariablesvsData type + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/TE2/Variables vs Data type/.settings/language.settings.xml b/TE2/Variables vs Data type/.settings/language.settings.xml new file mode 100644 index 0000000..5fa97fb --- /dev/null +++ b/TE2/Variables vs Data type/.settings/language.settings.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TE2/Variables vs Data type/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/TE2/Variables vs Data type/.settings/org.eclipse.cdt.managedbuilder.core.prefs new file mode 100644 index 0000000..ac5c889 --- /dev/null +++ b/TE2/Variables vs Data type/.settings/org.eclipse.cdt.managedbuilder.core.prefs @@ -0,0 +1,13 @@ +eclipse.preferences.version=1 +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/CPATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/CPATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/CPLUS_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/CPLUS_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/C_INCLUDE_PATH/delimiter=; +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/C_INCLUDE_PATH/operation=remove +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/append=true +environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/appendContributed=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/LIBRARY_PATH/delimiter=; +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/LIBRARY_PATH/operation=remove +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/append=true +environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.mingw.exe.debug.587337262/appendContributed=true diff --git a/TE2/Variables vs Data type/.settings/org.eclipse.core.resources.prefs b/TE2/Variables vs Data type/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..99f26c0 --- /dev/null +++ b/TE2/Variables vs Data type/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/TE2/Variables vs Data type/VariablesvsDataType.cpp b/TE2/Variables vs Data type/VariablesvsDataType.cpp new file mode 100644 index 0000000..fe34bbc --- /dev/null +++ b/TE2/Variables vs Data type/VariablesvsDataType.cpp @@ -0,0 +1,50 @@ + +#include +using namespace std; + +/* + * - Alle anderen Daten Typs sind wie in java, außer + * .boolean (geschrieben bool) + * + * - es gibt (signed und unsigned) + * . unsigned: speichert nur werte, die Positiv sind + * . signed : speichern negative und positive Numbers + */ + +int main() { + + // boolean // + bool wahr = true; // gibt 1 zurück + bool falsch = false;// gibt 0 zurück + + // Das gleiche Prinzip ist auch für false; + + int x = wahr; // speichert 1 + + if (wahr) + cout << "if wahr " << wahr <