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
0ccf365c
Commit
0ccf365c
authored
Dec 02, 2021
by
Benoit AUGER--DUBOIS
Browse files
correctif
parent
e5cb6544
Changes
1
Hide whitespace changes
Inline
Side-by-side
Tp5/tp5.cpp
View file @
0ccf365c
...
...
@@ -20,6 +20,7 @@ fonction retourne l’adresse de début du chainage */
t_cellule
*
enregistrement
(){
t_cellule
*
pcel
;
pcel
=
new
t_cellule
;
t_cellule
*
psuiv
;
t_cellule
*
tete
;
char
lettre
;
...
...
@@ -27,9 +28,9 @@ t_cellule * enregistrement(){
cin
>>
lettre
;
//------------- debut de la liste
tete
=
pcel
;
cout
<<
"test"
;
while
(
lettre
!=
'.'
){
pcel
->
info
=
lettre
;
psuiv
=
new
t_cellule
;
pcel
->
suivant
=
psuiv
;
cout
<<
"une lettre ? (Un point pour terminer) "
<<
endl
;
cin
>>
lettre
;
...
...
@@ -49,7 +50,7 @@ void affiche(t_cellule* pdeb){
pcel
=
pdeb
;
while
(
pcel
!=
nullptr
)
{
lettre
=
pcel
->
info
;
cout
<<
lettre
<<
endl
;
cout
<<
lettre
;
pcel
=
pcel
->
suivant
;
}
cout
<<
endl
;
...
...
@@ -62,5 +63,6 @@ int main(){
t_cellule
*
pcel
;
pcel
=
enregistrement
();
affiche
(
pcel
);
delete
pcel
;
return
-
1
;
}
\ No newline at end of file
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