Salut à tous ,
j'aurais une question que vous jugeriez surement débile . Savez vous comment faire pour que l'utilisateur de mon programme puisse introduire ses propres données ?
voici mon programme :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
 
#include "Student.h" ;
#include "Dozent.h" ;
#include <iostream> ;
void main (void) 
{
Cperson person("Jimi" , "Hendrix") ;
CStudent student("Janis" , "Joplin" , 4101970) ;
CDozent dozent("Kurt" , "cobain" , "kurt.cobain@gmail.com" ) ;
person.Ausgabe();
student.Ausgabe();
dozent.Ausgabe();
 
 
system ("pause") ;
}
#pragma once
#include "cperson.h"
class CStudent :
	public Cperson
{
private:
		int m_matrikelnummer ;
public:
	CStudent();
	CStudent(string vorname , string nachname , int matrikelnummer ) ;
	int GetMatrikelnummer() ;
	void SetMatrikelnummer ( int matrikelnummer ) ;
	void Ausgabe() ;
	~CStudent() ;
};
#include "Student.h"
 
 
CStudent::CStudent()
{
}
CStudent::CStudent(string vorname ,string nachname ,int matrikelnummer )
{
	SetVorname(vorname) ;
	SetNachname(nachname) ;
	m_matrikelnummer = matrikelnummer ;
}
int CStudent::GetMatrikelnummer()
{
	return m_matrikelnummer ;
}
void CStudent::SetMatrikelnummer(int matrikelnummer)
{
	m_matrikelnummer = matrikelnummer ;
}
void CStudent::Ausgabe()
{
	cout << "Matrikelnummer   : " << m_matrikelnummer << endl ;
}
CStudent::~CStudent()
{
}
#pragma once
#include "cperson.h"
class CDozent :
	public Cperson
{
private:
	string m_mail ;
public:
	CDozent();
	CDozent(string vorname , string nachname , string mail) ;
	string GetMail() ;
	void SetMail (string mail) ;
	void Ausgabe() ;
	~CDozent() ;
 
};
#include "Dozent.h"
 
 
CDozent::CDozent()
{
}
CDozent::CDozent(string vorname , string nachname , string mail )
{
	SetVorname(vorname) ;
	SetNachname(nachname) ;
	m_mail = mail ;
}
string CDozent::GetMail()
{
	return m_mail ;
}
void CDozent::SetMail(string mail)
{
	m_mail = mail ;
}
void CDozent::Ausgabe()
{
	cout << "Mail     :  " << m_mail << endl ;
}
 
	CDozent::~CDozent(void)
{
}
#pragma once
#include <iostream>
#include <string>
using namespace std ;
class Cperson
{
private:
	string m_vorname ;
	string m_nachname ;
public:
	Cperson();
	Cperson ( string vorname , string nachname );
	string GetVorname() ;
	void SetVorname( string vorname ) ;
	string GetNachname() ;
	void SetNachname(string nachname) ;
	void Ausgabe() ;
	~Cperson() ;
};
#include "Cperson.h"
 
 
Cperson::Cperson()
{
}
Cperson::Cperson(string vorname , string nachname)
{
	m_vorname = vorname , m_nachname = nachname ;
}
string Cperson::GetVorname()
{
	return m_vorname ;
}
void Cperson::SetVorname(string vorname)
{
	m_vorname = vorname ;
}
string Cperson::GetNachname()
{
	return m_nachname ;
}
void Cperson::SetNachname(string nachname)
{
	m_nachname = nachname ;
}
void Cperson::Ausgabe()
{
	cout << " Vorname   : " << m_vorname << endl ;
	cout << " Nachname  : " << m_nachname << endl ;
}
Cperson::~Cperson(void)
{
}
vous l'aurez surement compris , je programme en allemand ; et ce , parce que je poursuis mes etudes en Allemagne .
Merci à vous , au revoir .