Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
Korowai
unregistriert
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
#ifndef BERICHT_HPP_INCLUDED #define BERICHT_HPP_INCLUDED #include <vector> #include <iostream> #include "MobilBericht.hpp" class Bericht { public: int Ersteller; int RundebisVerfall; int Erstellbasisnummer; int Berichtnummer; Mobilbericht cMobilBericht; Bericht (); ~Bericht(); }; #endif // BERICHT_HPP_INCLUDED |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
#include <iostream> #include "Bericht.hpp" #include "MobilBericht.hpp" using namespace std; Bericht::Bericht() : BerichtMobilart(), BerichtMobilstandort(), BerichtMobilziele() //Hier meckert der compiler { } Bericht::~Bericht() { } [cpp] Mobilbericht.hpp: [cpp] #ifndef MOBILBERICHT_HPP_INCLUDED #define MOBILBERICHT_HPP_INCLUDED #include <vector> #include <iostream> class Mobilbericht { public: int BerichtMobilart; int BerichtMobilstandort; int BerichtMobilziele; }; #endif // MOBILBERICHT_HPP_INCLUDED |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#include "Mobilbericht.hpp" #include "Bericht.hpp" using namespace std; Mobilbericht::Mobilbericht() { BerichtMobilart=0; BerichtMobilstandort=0; BerichtMobilziele=0; } Mobilbericht::~Mobilbericht() { } |
Administrator
Gabs den gleichen Thread nicht schon vor 3 Tagen?
Gabs den gleichen Thread nicht schon vor 3 Tagen?
Korowai
unregistriert
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
#include <vector> #include <iostream> #include "MobilBericht.hpp" #include "Bericht.hpp" using namespace std; Mobilbericht cMobilbericht; Bericht cBericht (Mobilbericht()); std::vector<Mobilbericht> vBerichte; int main() { int Standort; int Ziel; int Art; int Anzahl; int Ausgabe; cout << "Wieviele Mobile?" << endl; cin>>Anzahl; cout << endl; for (int y=0;y<Anzahl;y++) { vBerichte.push_back(Mobilbericht()); }; for (int x=0;x<vBerichte.size();x++) { cout << "Dateneingabe" << endl; cout << "Standort 1-4? "; cin >> Standort; cout <<endl; cout << "Dateneingabe" << endl; cout << "Ziel 1-4? "; cin >> Ziel; cout << endl; cout << "Dateneingabe" << endl; cout << "Mobilart 1-4? "; cin >> Art; cout <<endl; vBerichte[x].BerichtMobilart=Art; vBerichte[x].BerichtMobilstandort=Standort; vBerichte[x].BerichtMobilziele=Ziel; } cout << "Berichte erstellt"<<endl; cout << endl; cout << "Welchen Bericht wollen Sie sehen?"; cout <<endl; cout << "1 bis " << Anzahl << " ? "; cin >> Ausgabe; cout << endl; cout << vBerichte[Ausgabe-1].BerichtMobilart << " ist die Art des Mobils"<<endl; cout << vBerichte[Ausgabe-1].BerichtMobilstandort << " ist der Standort" <<endl; cout << vBerichte[Ausgabe-1].BerichtMobilziele << " ist das Ziel" << endl; return 0; } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
#ifndef BERICHT_HPP_INCLUDED #define BERICHT_HPP_INCLUDED #include <vector> #include <iostream> #include "MobilBericht.hpp" class Bericht { public: int Ersteller; int RundebisVerfall; int Erstellbasisnummer; int Berichtnummer; Bericht (); ~Bericht(); Mobilbericht cMobilBericht; }; #endif // BERICHT_HPP_INCLUDED |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
#include "MobilBericht.hpp" using namespace std; Bericht::Bericht() { } Bericht::~Bericht() { } |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#ifndef MOBILBERICHT_HPP_INCLUDED #define MOBILBERICHT_HPP_INCLUDED #include <vector> #include <iostream> class Mobilbericht { public: Mobilbericht(); ~Mobilbericht(); int BerichtMobilart; int BerichtMobilstandort; int BerichtMobilziele; }; #endif // MOBILBERICHT_HPP_INCLUDED |
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#include "Mobilbericht.hpp" #include "Bericht.hpp" using namespace std; Mobilbericht::Mobilbericht() { BerichtMobilart=0; BerichtMobilstandort=0; BerichtMobilziele=0; } Mobilbericht::~Mobilbericht() { } |
Community-Fossil
Beruf: Teamleiter Mobile Applikationen & Senior Software Engineer
Korowai
unregistriert
Werbeanzeige