Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Benoit AUGER--DUBOIS
L2_S1_ALGO_STRUCT_DONNEE
Commits
1d40d3c8
Commit
1d40d3c8
authored
Nov 17, 2021
by
Benoit AUGER--DUBOIS
Browse files
Merge branch 'main' of gitlab.univ-nantes.fr:E188469H/l2_s1_algo_struct_donnee into main
parents
13baf20b
6b2c05a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Tp3/tp3.cpp
View file @
1d40d3c8
...
...
@@ -29,7 +29,7 @@ void changeEtuName (vector <t_etudiante> &tetu, int indice){
cout
<<
"Entrer le nom de l'étudiante : "
<<
endl
;
cin
.
clear
();
cin
.
sync
();
cin
.
ignore
();
cin
.
ignore
();
// permet d'utiliser le getline sans bug car les cin font bug.
getline
(
cin
,
nom
);
tetu
[
indice
].
nom_prenom
=
nom
;
}
...
...
@@ -156,8 +156,6 @@ int main(){
int
numberOfStudents
;
cout
<<
"Entrer le nombres d'étudiant du groupe"
<<
endl
;
cin
>>
numberOfStudents
;
cin
.
clear
();
cin
.
sync
();
const
int
nb
=
numberOfStudents
;
if
(
numberOfStudents
>
0
){
vector
<
t_etudiante
>
tabEtu
(
nb
);
// création du tableau dynamique aussi appelée vector.
...
...
@@ -178,14 +176,10 @@ int main(){
while
((
etuT1
!=
-
1
)
&&
(
etuT2
!=
-
1
)){
cout
<<
"entrer le numéro du premier étudiant du binome, ou -1 pour arrêter "
<<
endl
;
cin
>>
etuT1
;
cin
.
clear
();
cin
.
sync
();
if
(
etuT1
<
0
)
break
;
cout
<<
"entrer le numéro du deuxième étudiant du binome, ou -1 pour arrêter "
<<
endl
;
cin
>>
etuT2
;
cin
.
clear
();
cin
.
sync
();
if
(
etuT2
<
0
)
break
;
// vérifie que les numéros éxiste dans le groupe d'étudiant
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment