Skip to content
Snippets Groups Projects
Commit 484396a6 authored by Hendrik Haidmann's avatar Hendrik Haidmann :space_invader:
Browse files

feat: add zusatzaufgabe2

parent e79d3bbc
No related branches found
No related tags found
No related merge requests found
# CMakeList.txt: CMake-Projekt für "zusatzaufgabe2". Schließen Sie die Quelle ein, und definieren Sie
# projektspezifische Logik hier.
#
cmake_minimum_required (VERSION 3.8)
# Aktivieren Sie Hot Reload für MSVC-Compiler, sofern unterstützt.
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()
project ("zusatzaufgabe2")
# Fügen Sie der ausführbaren Datei dieses Projekts eine Quelle hinzu.
add_executable (zusatzaufgabe2 "zusatzaufgabe2.cpp" "zusatzaufgabe2.h")
if (CMAKE_VERSION VERSION_GREATER 3.12)
set_property(TARGET zusatzaufgabe2 PROPERTY CXX_STANDARD 20)
endif()
# TODO: Fügen Sie bei Bedarf Tests hinzu, und installieren Sie Ziele.
{
"version": 3,
"configurePresets": [
{
"name": "windows-base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_C_COMPILER": "cl.exe",
"CMAKE_CXX_COMPILER": "cl.exe"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
}
},
{
"name": "x64-debug",
"displayName": "x64 Debug",
"inherits": "windows-base",
"architecture": {
"value": "x64",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "x64-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "x86-debug",
"displayName": "x86 Debug",
"inherits": "windows-base",
"architecture": {
"value": "x86",
"strategy": "external"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "x86-release",
"displayName": "x86 Release",
"inherits": "x86-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "linux-debug",
"displayName": "Linux Debug",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Linux"
},
"vendor": {
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
}
}
},
{
"name": "macos-debug",
"displayName": "macOS Debug",
"generator": "Ninja",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"installDir": "${sourceDir}/out/install/${presetName}",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"vendor": {
"microsoft.com/VisualStudioRemoteSettings/CMake/1.0": {
"sourceDir": "$env{HOME}/.vs/$ms{projectDirName}"
}
}
}
]
}
#include "zusatzaufgabe2.h"
using namespace std;
int main()
{
int alter;
string bezeichner;
cout << "Bitte gib dein Alter ein: " << endl;
cin >> alter;
if (alter >= 60)
{
bezeichner = "Oldtimer";
}
else
{
bezeichner = "Jungspund";
}
cout << "Du bist ja ein echter " << bezeichner << "!" << endl;
return 0;
}
// zusatzaufgabe2.h: Includedatei für Include-Standardsystemdateien
// oder projektspezifische Includedateien.
#pragma once
#include <iostream>
// TODO: Verweisen Sie hier auf zusätzliche Header, die Ihr Programm erfordert.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment