C Für Kids Ganz Einfach Programmieren Lernen Und Eigene Spiele Erstellen 2nd Edition Hans-Georg Schumann Full Chapter Download PDF
C Für Kids Ganz Einfach Programmieren Lernen Und Eigene Spiele Erstellen 2nd Edition Hans-Georg Schumann Full Chapter Download PDF
https://ebookstep.com/product/android-apps-programmieren-fur-
kids-2726th-edition-hans-georg-schumann/
https://ebookstep.com/product/computer-fur-kids-so-funktionieren-
pcs-laptops-smartphones-co-9th-edition-hans-georg-schumann/
https://ebookstep.com/product/let-s-play-programmieren-lernen-
mit-java-und-minecraft-plugins-erstellen-ohne-vorkenntnisse-5th-
edition-daniel-braun/
https://ebookstep.com/product/c-f-gellert-s-sammtliche-fabeln-
und-erzahlungen-c-f-gellert/
Löffler Petrides Biochemie und Pathobiochemie Peter C
Heinrich Editor Matthias Müller Editor Lutz Graeve
Editor Hans Georg Koch Editor
https://ebookstep.com/product/loffler-petrides-biochemie-und-
pathobiochemie-peter-c-heinrich-editor-matthias-muller-editor-
lutz-graeve-editor-hans-georg-koch-editor/
https://ebookstep.com/product/neglect-und-assoziierte-
storungen-2nd-edition-georg-kerkhoff-lena-schmidt/
https://ebookstep.com/product/beliefs-und-selbstreguliertes-
lernen-eine-studie-in-projektkursen-der-mathematik-in-der-
gymnasialen-oberstufe-hans-jurgen-stoppel/
https://ebookstep.com/product/coole-spiele-mit-scratch-3-2nd-
edition-al-sweigart/
https://ebookstep.com/product/statistik-und-maschinelles-lernen-
eine-mathematische-einfuhrung-in-klassische-und-moderne-
methoden-2nd-edition-mathias-trabs/
Inhaltsverzeichnis
C++ für Kids
Impressum
Einleitung
Welches Werkzeug benötigen wir?
Und was bietet dieses Buch?
Wie arbeitest du mit diesem Buch?
Was brauchst du für dieses Buch?
Hinweise für Lehrer
Kapitel 1: Erste Schritte mit C++
Visual Studio starten
Kleine Spritztour durchs Studio
Das erste Programm
Der Quelltext
Hallo
cout und cin
Datentypen
Visual Studio beenden
Zusammenfassung
Ein paar Fragen …
… und eine Aufgabe
Kapitel 2: Typen und Operatoren
Variablen und Werte
Typenvielfalt
Rechenspiele
Operationen
Ausgabe mit Format
Mathe mit Strings?
Konstanten
Zusammenfassung
Ein paar Fragen …
… und zwei Aufgaben
Kapitel 3: Kontrolle und Auswahl
Ein Projekt öffnen
Die if-Struktur
if und else
Vergleichsoperatoren
Verknüpfungen
Von Fall zu Fall
Zusammenfassung
Ein paar Fragen …
… und ein paar Aufgaben
Kapitel 4: Wiederholungen
Zufallszahlen
Es darf geraten werden
while oder do-while?
Wie oft?
Zählschleifen
break oder continue?
Verschachtelungen
Zusammenfassung
Ein paar Fragen …
… und ein paar Aufgaben
Kapitel 5: Funktionen
C++ ist lernfähig
Init, Play, Evaluate
Lokal oder global?
Parameter
Wertverlust?
bool und return
Wert oder Referenz
Prototypen
Zusammenfassung
Ein paar Fragen …
… und ein paar Aufgaben
Kapitel 6: Arrays, Strukturen, Zeiger
Variablenfelder
Dimensionen
Die Sache mit struct
Adressen …
… und Zeiger
Zusammenfassung
Ein paar Fragen …
… und zwei Aufgaben
Kapitel 7: Klassen und Module
Spieler-Struktur
Alles unter einem Hut?
Es geht nicht ohne public
Keine Klasse ohne Konstruktor
Privatsphäre
Neue Dateien
Projekt-Module
Zusammenfassung
Keine Fragen …
… aber ein paar Aufgaben
Kapitel 8: Vererbung und Polymorphie
Erbschaften
Noch mehr Konstruktoren?
Überladen von Funktionen
Überschreiben von Funktionen
Polymorphie
Zeiger auf Objekte
Destruktionen?
Objekt-Felder
Zusammenfassung
Ein paar Fragen …
… und zwei Aufgaben
Kapitel 9: Container und Datenströme
Dynamische Arrays
Suchen und Finden
Verkettete Listen
Die Sache mit dem Iterator
Datenverkehr
Flexible Mengen
Zusammenfassung
Ein paar Fragen …
… und zwei Aufgaben
Kapitel 10: Kleiner Krabbelkurs
Windows Forms
Das erste Fenster
Die Box fürs Bild
Ein Käfer auf dem Spielfeld
Tastensteuerung
Zusammenfassung
Ein paar Fragen …
… doch keine Aufgabe
Kapitel 11: Fratzenjagd
Richtungswechsel
Kein Spiel ohne Grenzen
Maussteuerung
Die Sache mit dem Timer
Klicken und Treffen
Ende oder Nochmal?
Zusammenfassung …
… und Schluss
Eine Frage …
… und eine Aufgabe
Anhang A
Visual Studio installieren
Einsatz der Buch-Dateien
Anhang B
Kleine Checkliste
Dem Fehler auf der Spur
try und catch
Für
Janne, Julia, Katrin und Daniel
Hans-Georg Schumann
ISBN 978-3-7475-0690-5
2. Auflage 2023
www.mitp.de
E-Mail: [email protected]
Telefon: +49 7953 / 7189 - 079
Telefax: +49 7953 / 7189 - 082
Der Verlag räumt Ihnen mit dem Kauf des E-Books das Recht ein,
die Inhalte im Rahmen des geltenden Urheberrechts zu nutzen.
Dieses Werk, einschließlich aller seiner Teile, ist urheberrechtlich
geschützt. Jede Verwertung außerhalb der engen Grenzen des
Urheberrechtsgesetzes ist ohne Zustimmung des Verlags unzulässig
und strafbar. Dies gilt insbesondere für Vervielfältigungen,
Übersetzungen, Mikroverfilmungen und die Einspeicherung und
Verarbeitung in elektronischen Systemen.
Und damit bist du bei diesem Buch genau richtig. Hier bekommst du
über neun Kapitel solide und umfassende Grundlagen der
Programmiersprache C++ vermittelt. Und damit du von Anfang an in
die Spieleprogrammierung hineinschnuppern kannst, sind die
Beispiele fast alle auf Spiele bezogen.
Weil in der ganzen Welt Leute zu finden sind, die wenigstens ein
paar Brocken Englisch können, besteht auch fast jede
Programmiersprache aus englischen Wörtern.
Um dir den Weg vom ersten Projekt bis zu einem fertigen Game
einfacher zu machen, gibt es einige zusätzliche Symbole, die ich dir
hier gern erklären möchte:
Arbeitsschritte
www.mitp.de/0688
www.mitp.de/0688
Betriebssystem
Speichermedien
Auf jeden Fall benötigst du etwas wie einen USB-Stick oder eine SD-
Card, auch wenn du deine Programme auf die Festplatte speichern
willst. Auf einem externen Speicher sind deine Arbeiten auf jeden
Fall zusätzlich sicher aufgehoben.
Vielleicht ist es Ihnen lieber, wenn Ihre Schüler die Projekte alle
selbst erstellen. Dann lassen Sie die Download-Dateien einfach (erst
einmal) weg.
Übungsmedien
Regelmäßig sichern
Es ist sinnvoll, für das neue Symbol auf dem Desktop den Text
devenv.exe – Verknüpfung durch Visual Studio zu ersetzen.
Dort sehen wir uns jetzt ein bisschen um. Über die Bedeutung der
einzelnen Fenster (es gibt noch mehr davon) erfährst du nach und
nach Genaueres. Hier nur ein kurzer Überblick:
Nun soll uns nur die Menüleiste interessieren – ganz oben:
Links darunter befinden sich jede Menge Symbole, die man mit der
Maus anklicken kann. Zu einigen davon kommen wir im Laufe der
folgenden Kapitel noch.
FOOTNOTES
It was among this rude nomad people that Jenghiz Khan was born
in 1162. The son of the chief of a tribe dwelling at the mouths of the
Onon and the Ingoda, affluents of the Amur, Jenghiz was far
removed from the focus of central Asian political life, and his power
was originally very small. The first forty years of his life were spent in
struggles with the surrounding peoples; it is even said that for ten
years he was in captivity with the Nyûché, or Chûrché (the
Manchurian rulers of northern China known under the name of the
dynasty of Kin), during which time he became acquainted with
Chinese customs and manners, and also with the weakness of the
rulers of China. Having conquered various Mongolian tribes, he
proclaimed himself emperor at a general assembly of the princes,
which was held at the sources of the river Onon (1206).
“By thus taking the imperial title,” says V. P. Vasiliev, “he gave
perfect expression to the purely Chinese conception that, as there is
only one sun in the heavens, so there must be only one emperor on
earth; and all others bearing this title, all states having any
pretensions to independent existence thereby offend the will of
heaven and invite chastisement.” His successes in Mongolia are
explained by his surpassing military talent, the system of purely
military organisation adopted by him, and by the fact that he gave
places in his service to all those who were gifted, of whatever race
they might be.[11] Jenghiz Khan’s conquests advanced rapidly; in
1206 he devastated the kingdom of Tangut (in southern Mongolia)
and in 1210 he commenced a war with the Nyûché, ruling in northern
China. The war dragged on, and meanwhile the shah of Khuarezm
(Bokhara) gave offence to Jenghiz Khan by slaying the Mongolian
ambassadors. Leaving his captains in China, the Mongolian khan
marched to Bokhara (1219), whence, partly in pursuit of the shah
and partly led on by the passion for pillage, the Mongolian troops
directed their way to the west, doubled the southern shore of the
Caspian Sea, crossed the Caucasus, and penetrated into the
steppes of the Polovtsi.
The leaders of these troops were Chépé and
[1223-1228 a.d.] Subutai Bahadar. The Polovtsi applied for help
to the Russian prince Mstislav Mstislavitch, and
he called together the princes of southern Russia, amongst whom
the most important were Mstislav Romanovitch of Kiev and Mstislav
Sviatoslavitch of Tchernigov. The armies of the princes moved to the
help of the Polovtsi, and although the Tatars sent ambassadors
saying, “God has permitted us to come on our steeds with our slaves
against the accursed Polovtsi; come and make peace with us, for we
have no quarrel with you,” the princes decided upon a battle which
took place by the river Kalka in the government of Iekaterinoslav.
The Russian princes, who did not act in unison, were beaten (1223),
and many were killed, amongst others Mstislav of Kiev. The Tatars
did not penetrate far into Russia, but turned back and were soon
forgotten.[12] Meanwhile the Tatar captains returned to Jenghiz
Khan, who, having definitively subdued Tangut and northern China,
died in 1227. He had during his lifetime divided his possessions
amongst his four sons: to the descendants of Juji (then already
dead) was allotted Kiptchak (that is the steppe extending from
central Asia into southern Russia); to Jagatai, Turkestan; to Okkodai
(Ogdai) China; to Tuli, the nomad camps adjoining the share of
Okkodai. Over these princes was to be exalted the great khan,
chosen in a solemn assembly of all the princes. In 1228 Okkodai
was proclaimed great khan.
At first the question of succession, then the
[1237-1241 a.d.] final consolidation of the empire in northern
China, and then again the commencement of
the war with the south kept the princes around the great khan, and it
was only in 1235 that Okkodai sent his nephew Batu, son of Juji,
together with Manku, son of Tuli, and his own son Kuiuk, to conquer
the western lands; to their number was added Sabutai, famous for
his Kiptchak campaign. First of all they conquered the Bulgarians on
the Volga, and then came to the land of Riazan. Here they exacted
from the princes a tribute of a tenth of all their possessions both in
lands and in men; the courageous resistance of the Riazan princes
proved unsuccessful, chiefly because the princes of northern Russia
did not unite, but decided on defending themselves separately. After
the devastation of Riazan and the slaughter of her princes (1237),
followed that of Suzdal. Having taken Moscow, the Tatars marched
to Vladimir, where they slew the family of the grand prince, while he
himself was defeated and killed on the banks of the Sit (1238).
Thence they were apparently going to Novgorod, but returned—
probably to avoid the marshes. On their way back, Kozelsk detained
them for a long time, but it was finally taken and pillaged.
The tactics of the Tatars in this war consisted in first
encompassing each region as hunters do, and then joining forces at
one centre, thus devastating all. In the years 1239-1240 the Tatars
ravaged southern Russia, and in 1240 they took and laid waste Kiev.
All Europe trembled at the horrors of the Tatar invasion; the emperor
Frederick II called for a general arming, but his calls were in vain.
Meanwhile the Tatars advanced to Hungary (1241) and Poland, and
defeated the Polish princes at Liegnitz in Silesia; and it was only the
courageous defence of Olmütz in Moravia, by the Czech voyevod
Iaroslav, and the gathering of armies under the command of the
Czech king and the dukes of Austria and Carinthia, that finally
caused the Tatars to turn back. They then founded their chief
dwelling place on the Volga, where near the present town of Tsareva
(government of Astrakhan) they established a wintering place for the
horde—Sarai. There the Russian princes began to arrive with tribute.
At first, however, they were obliged to go to the great khan in
Mongolia; for the first khans, Okkodai, Kuiuk, and Mangku, were
lawfully chosen by the princes, and maintained their authority over all
the empire of Jenghiz Khan; and it was only from the time of Kublai
(1260), who arbitrarily took possession of the throne and removed
the seat of government to China, that the bond was definitively
severed.