• Keine Ergebnisse gefunden

Anlegen von Projekten mit Visual Studio

N/A
N/A
Protected

Academic year: 2021

Aktie "Anlegen von Projekten mit Visual Studio"

Copied!
2
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Historisch-Kulturwissenschaftliche Informationsverarbeitung, Universität zu Köln Programmierpropädeutikum, Sommersemester 2015

Dr. Jan G. Wieners

1 / 2

Anlegen von Projekten mit Visual Studio

(2)

Historisch-Kulturwissenschaftliche Informationsverarbeitung, Universität zu Köln Programmierpropädeutikum, Sommersemester 2015

Dr. Jan G. Wieners

2 / 2

Grundaufbau einer C++ Anwendung

#include <iostream> //Bibliothek, die Ein/Ausgabe koordiniert (cout/cin) using namespace std; //Standard-Namensraum

int main() {

cout << "Hello World!" << endl;

}

Ein wenig Theorie um C++

C++ ist eine statisch typisierte Programmiersprache. Anders als bei JavaScript wird in C++ somit der Datentyp der Variable angegeben:

 int meineVariable; // Nimmt ganzzahlige Werte auf

 float meineVariable; // Fließkommazahlen

 char meineVariable; // EIN Zeichen

 char meineVariable[10]; // Char-Array Platz für zehn Zeichen

 bool meineVariable; // Wahr (true) oder falsch (false)

C++ ist eine compilierte Programmiersprache – aus dem C++ Quelltext erstellt der Compiler eine ausführbare Binärdatei (*.exe).

Snippets

For-Schleife (führe etwas wiederholt aus):

for (int i = 0; i < 100; i++) { cout << i << endl;

}

Auswahlanweisung mit if, else if, else

if (wert == 23) {

cout << "Dreiundzwanzig";

} else if (wert == 15) { cout << "Fünfzehn";

} else {

cout << "Anderer Wert";

}

Referenzen

ÄHNLICHE DOKUMENTE

Compute the point x k+1 using the damped Newton algorithm and compare it to the one returned by the classical Newton method. What do

Determine the number of gradient steps required for finding the minimum of f with the different matrices M and initial value x0 = [1.5;0.6] (use = 10

Herefore, write function files testfunction.m and rosenbrock.m which accept an input argument x and return the function and gradient values at x. Finally, write a file main.m where

Universität Konstanz Sommersemester 2015 Fachbereich Mathematik und

Historisch-Kulturwissenschaftliche Informationsverarbeitung IT-Zertifikat der Phil.-Fak.: Advanced Web

Historisch-Kulturwissenschaftliche Informationsverarbeitung, Universität zu Köln IT-Zertifikat der Phil.-Fak.: Advanced Web

Historisch-Kulturwissenschaftliche Informationsverarbeitung Basisinformationstechnologie

Historisch-Kulturwissenschaftliche Informationsverarbeitung Basisinformationstechnologie