bonjour
Je viens d'ecrire un snake, mais je peu bougé mon serpent que par les touche Z S D Q. J'ai essayé d'utulisé les fleche de direction du clavier. Mais j'arrive pas qui pourrai m'aidé???
bonjour
Je viens d'ecrire un snake, mais je peu bougé mon serpent que par les touche Z S D Q. J'ai essayé d'utulisé les fleche de direction du clavier. Mais j'arrive pas qui pourrai m'aidé???
Bonjour,
Ca va dépendre du système sur lequel ton appli est développé. Peux-tu préciser ?
Ressources proposées par 3DArchi - Les fonctions virtuelles en C++ - Cours et tutoriels C++ - FAQ C++ - Forum C++.
Qu'utilises-tu pour lire l'état des touches ZSQD ?
Ressources proposées par 3DArchi - Les fonctions virtuelles en C++ - Cours et tutoriels C++ - FAQ C++ - Forum C++.
Quelle lib de fenêtrage utilises tu ? Glut, SDL, ...
Linux > *
voila mon codage
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753 #include <fstream.h> #include <iostream> #include <conio.h> #include <stdlib.h> #include <process.h> #include <time.h> #include <string.h> #define A 70000000 using namespace std; struct slang { int co_x [200]; int co_y [200]; int staart; }; struct bol { int x,y; }; void kop_sm (slang& s, int l) { if (l== 'Z' || l=='z') {if(s.co_y[0]==0) {s.co_y[0]=9;} else {s.co_y [0]=(s.co_y[0]-1)%10;}} else if (l=='S' || l=='s') {s.co_y [0]=(s.co_y[0]+1)%10;} else if (l=='D' || l=='d') {if (s.co_x[0]==19) {s.co_x[0]=0;} else {s.co_x [0]=(s.co_x[0]+1)%20;}} else if (l=='Q' || l=='q'){if(s.co_x[0]==0) {s.co_x[0]=19;} else {s.co_x [0]=(s.co_x[0]-1)%20;}} } void kop (slang& s, int l) { if (l== 'Z' || l=='z') {s.co_y [0] --;} else if (l=='S' || l=='s') {s.co_y [0] ++;} else if (l=='D' || l=='d') {s.co_x [0] ++;} else if (l=='Q' || l=='q'){s.co_x [0] --;} } void vrijtussen (slang& s, int i) { int tempx,inix; int tempy,iniy; inix = s.co_x [i]; iniy = s.co_y [i]; while (i != s.staart) { tempx = s.co_x [i+1]; tempy = s.co_y [i+1]; s.co_x [i+1] = inix; s.co_y [i+1] = iniy; inix = tempx; iniy = tempy; i++; } } int zoek (slang s, bol b) { int i; for(i=0 ; i!=s.staart ; i++) { if (s.co_x[i]==b.x && s.co_y [i]==b.y) {return 1;} } return 0; } void tir_bol (slang s, bol& b) { srand(time(NULL)); trekking: b.x = rand()%20; b.y = rand()%10; if (zoek(s,b)==1) {goto trekking;} } void init_slang (slang& s) { int i; s.staart=5; for (i=0 ; i<s.staart ; i++) { s.co_x [i]=i+10; s.co_y [i]=5; } } int positie (int x, int y, int x1, int y1) { if (y==y1 && x==x1+1) {return 0;} if (y==y1 && x==x1-1) {return 1;} if (y==y1+1 && x==x1) {return 2;} if (y==y1-1 && x==x1) {return 3;} return 54; } void tekening (slang s,char tab[10][20]) { int i; char q=246; char b=192; char c=217; char d=191; char e=218; char t=1; tab[s.co_y[0]][s.co_x[0]]=t; for (i=1 ; i<s.staart ; i++) { if (positie(s.co_x[i],s.co_y[i],s.co_x[i-1],s.co_y[i-1])==1) { if (positie(s.co_x[i],s.co_y[i],s.co_x[i+1],s.co_y[i+1])==2) {tab [s.co_y[i]][s.co_x[i]]=b;} if (positie(s.co_x[i],s.co_y[i],s.co_x[i+1],s.co_y[i+1])==3) {tab [s.co_y[i]][s.co_x[i]]=e;} } if (positie(s.co_x[i],s.co_y[i],s.co_x[i-1],s.co_y[i-1])==0) { if (positie(s.co_x[i],s.co_y[i],s.co_x[i+1],s.co_y[i+1])==2) {tab [s.co_y[i]][s.co_x[i]]=c;} if (positie(s.co_x[i],s.co_y[i],s.co_x[i+1],s.co_y[i+1])==3) {tab [s.co_y[i]][s.co_x[i]]=d;} } if (positie(s.co_x[i],s.co_y[i],s.co_x[i+1],s.co_y[i+1])==1) { if (positie(s.co_x[i],s.co_y[i],s.co_x[i-1],s.co_y[i-1])==2) {tab [s.co_y[i]][s.co_x[i]]=b;} if (positie(s.co_x[i],s.co_y[i],s.co_x[i-1],s.co_y[i-1])==3) {tab [s.co_y[i]][s.co_x[i]]=e;} } if (positie(s.co_x[i],s.co_y[i],s.co_x[i+1],s.co_y[i+1])==0) { if (positie(s.co_x[i],s.co_y[i],s.co_x[i-1],s.co_y[i-1])==2) {tab [s.co_y[i]][s.co_x[i]]=c;} if (positie(s.co_x[i],s.co_y[i],s.co_x[i-1],s.co_y[i-1])==3) {tab [s.co_y[i]][s.co_x[i]]=d;} } } tab [s.co_y[s.staart-1]][s.co_x[s.staart-1]]=q; } void beeld (slang s, bol b, char tab [10][20],int point ,int nbb,int gb) { int i,j; char q=246; char k=192; char c=217; char d=191; char e=218; char f=4; char t=1; char bou; if(nbb==3) {bou=5;} else {bou=6;} tab [b.y][b.x]=bou; for (i=1 ; i<s.staart ; i++) {tab [s.co_y[i]][s.co_x[i]]=f;} tekening(s,tab); for (i=0;i<10;i++) { for(j=0;j<20;j++) { if (tab[i][j]==q ||tab[i][j]==f||tab[i][j]==k||tab[i][j]==c||tab[i][j]==d||tab[i][j]==e||tab[i][j]==t||tab[i][j]==bou) {;} else tab[i][j]=' '; } } cout<<endl<<endl<<endl; cout<<" ###########$##########"<<endl; for (i=0;i<10;i++) { for(j=0;j<20;j++) { if(j==0) {cout<<" #";} cout<<tab[i][j]; if(j==19) {cout<<"#";} } if(i==3) {if(nbb==5) {cout<<" "<<bou<<" = "<<gb<<" pts";}} if(i==5) {cout<<" Points : "<<point;} cout<<endl; } cout<<" ######################"<<endl; } void schoonmaak (char tab [10][20]) { int i,j; for (i=0;i<10;i++) { for (j=0;j<20;j++) { tab[i][j]=' '; } } } void verzet (slang& s, char l,int sm) { vrijtussen(s,0); if(sm==1) {kop_sm(s,l);} else {kop(s,l);} } void eten (slang& s, bol& b, char l,int sm) { vrijtussen(s,1); s.staart++; s.co_x[1]=b.x; s.co_y[1]=b.y; tir_bol(s,b); if (sm==1) {kop_sm(s,l);} else {kop(s,l);} } int verloren (slang s) { int i; for (i=1 ; i<s.staart ; i++) { if(s.co_x[0]==s.co_x[i] && s.co_y[0]==s.co_y[i]) {return 1;} if(s.co_x[i-1]<0 || s.co_y[i-1]<0) {return 1;} if(s.co_x[i-1]>19 || s.co_y[i-1]>9) {return 1;} } return 0; } void kansberekening (slang s,int& touche,int touchep) { if(s.co_x[0]==19) {s.co_x[1]=20;} if(s.co_y[0]==9) {s.co_y[1]=10;} if(s.co_x[0]==s.co_x[1]-1 && s.co_y[0]==s.co_y[1]) {if(touche=='d' || touche=='D') {touche=touchep;}} else if(s.co_x[0]==(s.co_x[1]+1)%20 && s.co_y[0]==s.co_y[1]) {if(touche=='q' || touche=='Q') {touche=touchep;}} else if(s.co_x[0]==s.co_x[1] && s.co_y[0]==s.co_y[1]-1) {if(touche=='s' || touche=='S') {touche=touchep;}} else if(s.co_x[0]==s.co_x[1] && s.co_y[0]==(s.co_y[1]+1)%10) {if(touche=='z' || touche=='Z') {touche=touchep;}} } void invoegen (int &p, int niveau) { p = p+niveau; } void snelheid (int &temp, int niv) { if(niv==1) {temp=A;} if(niv==2) {temp=A*8/9;} if(niv==3) {temp=A*7/9;} if(niv==4) {temp=A*6/9;} if(niv==5) {temp=A*5/9;} if(niv==6) {temp=A*4/9;} if(niv==7) {temp=A*3/9;} if(niv==8) {temp=A*2/9;} if(niv==9) {temp=A*1/9;} } void presentatie () { system("cls"); cout<<endl<<endl<<endl; cout << " *********************" << endl; cout << " * *" << endl; cout << " * SNAKE *" << endl; cout << " * *" << endl; cout << " * *" << endl; cout << " * *" << endl; cout << " * Gemaakt door: *" << endl; cout << " * *" << endl; cout << " * Hamza *" << endl; cout << " * *" << endl; cout << " *********************" << endl; getch(); } int menu (char nom [8]) { char joueur [8]; int score; int i; char choix=0; while (choix!='3') { menu: system("cls"); cout<<"Speler : "<<nom<<endl<<endl; cout<<"Menu :"<<endl<<endl; cout<<"1 . Instructies"<<endl; cout<<"2 . Commandos"<<endl; cout<<"3 . SNAKE SPELEN"<<endl; cout<<"4 . Beste scores"<<endl; cout<<"5 . Mijn statistieken"<<endl; cout<<"6 . Speler veranderen"<<endl<<endl; cout<<"Esc = Spel beeindigen"<<endl; choix=getch(); if (choix=='1') { system("cls"); cout<<"Instructies :"<<endl<<endl<<endl; cout<<"Appels op eten om te groeien.. hoe langer hoe intteresanter."<<endl<<endl; cout<<"Wij kunnen de slang niet stoppen."<<endl<<endl; getch(); goto menu; } if (choix=='2') { system("cls"); cout<<"Gebruik de commandos om de slang te bewegen :"<<endl<<endl; cout<<" Z : Boven"<<endl; cout<<"Q : Links D : Rechts"<<endl; cout<<" S : Beneden"<<endl<<endl; cout<<"P : Pause"<<endl; cout<<"Esc : Beeindigen"<<endl; getch(); goto menu; } if (choix=='4') { system("cls"); cout<<" RANG SPELERS SCORE"<<endl<<endl; ifstream fichier; ifstream fichier2; fichier.open("score",ios::in); fichier2.open("nscore",ios::in); for (i=1 ; i<11 ; i++) { fichier>>score; fichier2>>joueur; cout<<"---------------------------------------------------------"<<endl; if(i==10) {cout<<"| "<<i;} else {cout<<"|"<<'\t'<<i;} cout<<'\t'<<"|"<<'\t'<<joueur<<'\t'<<'\t'<<"|"<<'\t'<<score<<'\t'<<"|"<<endl; } cout<<"---------------------------------------------------------"<<endl; getch(); } if (choix=='5') { system("cls"); cout<<"Mijn beste scores :"<<endl<<endl; ifstream fichier; fichier.open(nom,ios::in); for (i=1 ; i<11 ; i++) { fichier>>score; if(score==0 || score==1) {if (i==10) {cout<<i;} else {cout<<" "<<i;} cout<<" . "<<score<<" pt"<<endl;} else {if (i==10) {cout<<i;} else {cout<<" "<<i;} cout<<" . "<<score<<" pts"<<endl;} } getch(); } if (choix=='6') {return 2;} if (choix==27) {return 1;} } return 0; } int spel_modus () { char choix=0; cout<<"De 3 mogelijk keuzes zijn: "<<endl<<endl; cout<<"Mode 1 : keuze niveau met muren"<<endl; cout<<"Mode 2 : Niveau stijgend"<<endl; cout<<"Mode 3 : Keuze menu zonder muur"<<endl<<endl; cout<<"Esc : Annuleer"<<endl<<endl; while (choix!='r' || choix!='R') { choix=getch(); if (choix=='1') return 1; if (choix=='2') return 2; if (choix=='3') return 3; if (choix==27) return 0; } return 0; } int mode1 (slang& s,bol& b,int& point,int& touche,int niveau) { int res=0; if(s.co_x[0]==b.x && s.co_y[0]==b.y) {invoegen(point,niveau); eten(s,b,touche,0); res=1;} else {verzet(s,touche,0);} return res; } void mode2 (slang& s,bol& b,int& point,int& temp, int& touche) { verzet(s,touche,0); if(s.co_x[0]==b.x && s.co_y[0]==b.y) {temp=temp*6/7; invoegen(point,40); tir_bol(s,b);} } int mode3 (slang& s,bol& b,int& point,int& touche,int niveau) { int res=0; if(s.co_x[0]==b.x && s.co_y[0]==b.y) {invoegen(point,niveau); eten(s,b,touche,1); res=1;} else {verzet(s,touche,1);} return res; } int mode4 (slang& s,bol& b,int& point,int& touche,int murs,int x) { int res; if(murs==0) { if(s.co_x[0]==b.x && s.co_y[0]==b.y) {point=point+x; eten(s,b,touche,1); res=1;} else {verzet(s,touche,1);} } else { if(s.co_x[0]==b.x && s.co_y[0]==b.y) {point=point+x; eten(s,b,touche,0); res=1;} else {verzet(s,touche,0);} } return res; } int kies_spel (int &temp, int &niveau, int &mdj) { char nv; if (mdj==2) { snelheid(temp,2); } if (mdj==1 || mdj==3) { cout<<"Kies niveau (1 a 9) ? "<<endl; while (niveau<=0 || niveau>9) { nv=getch(); if(nv==27) {return 1;} niveau=nv; niveau=niveau-48; } snelheid(temp,niveau); } return 0; } void copie (char mot [8], char temp [10][8],int a) { int i; for (i=0 ; i<8 ; i++) { temp[a][i]=mot[i]; } } void copie2 (char mot [8], char temp [10][8],int a) { int i; for (i=0 ; i<8 ; i++) { mot[i]=temp[a][i]; } } int beste_score (int point,char nom [8],char joueur [8]) { int place=-1; int pts; int test=0; int i=0, j=0; int sc [10]; ifstream fichier; fichier.open(nom,ios::in); while(i<10) { fichier>>pts; sc[i]=pts; if (pts<point) { test=1; if(nom=="score") {place=i; cout<<"Beste score n "<<i+1<<endl;} else {cout<<"Is uw "<<"Performantie n "<<i+1<<endl;} sc[i]=point; if (i==9) {;} else {sc[i+1]=pts; i++;} point=-1; } i++; } fichier.close(); ofstream fichier2; fichier2.open(nom,ios::out); for (i=0 ; i<10 ; i++) { fichier2<<sc[i]<<'\n'; } fichier2.close(); if(place>=0) { char mot [8]; char temp [10][8]; fichier.open("nscore",ios::in); for (i=0 ; i<10 ; i++) { fichier>>mot; if (i==place) { copie(joueur,temp,place); if((i+1)<10) { copie(mot,temp,i+1); i++; } } else {copie(mot,temp,i);} } fichier.close(); fichier2.open("nscore",ios::out); for (i=0 ; i<10 ; i++) { copie2(mot,temp,i); fichier2<<mot<<'\n'; } fichier2.close(); } return test; } void init () { int pt=500, i=0; int sc [10]; char mot [8]; strcpy(mot,"hamza"); for(i=0 ; i<10 ; i++) { sc[i]=pt; pt=pt-25; } ofstream fichier2; fichier2.open("score",ios::out); for (i=0 ; i<10 ; i++) { fichier2<<sc[i]<<'\n'; } fichier2.close(); fichier2.open("nscore",ios::out); for (i=0 ; i<10 ; i++) { fichier2<<mot<<'\n'; } fichier2.close(); } void init_beste_score(char nom [8]) { int i; int sc [10]; for(i=0 ; i<10 ; i++) { sc[i]=0; } ofstream fichier2; fichier2.open(nom,ios::out); for (i=0 ; i<10 ; i++) { fichier2<<sc[i]<<'\n'; } fichier2.close(); } int keuze_gebruiker(char nom [8]) { char n [8]; int i; char chx; int c; startpos: i=1; ifstream fichier; fichier.open("User",ios::app); cout<<" 0. Nieuwe speler"<<endl<<endl; while(fichier>>n) { if (i<10) {cout<<" "<<i;} else {cout<<i;} cout<<". "<<n<<endl; i++; } cout<<endl<<endl<<"Keuze van gebruiker :"<<'\t'<<'\t'<<"Esc = Beeindigen"<<endl; chx=getch(); c=chx; fichier.close(); fichier.open("User",ios::app); if (chx==27) {return 2;} if(c<48 || c>48+i-1) {system("cls"); fichier.close(); goto startpos;} if(c==48) {return 0;} else { for(i=1 ; i<=c-48 ; i++) { fichier>>n; if(i==c-48) {strcpy(nom,n);} } } return 1; } void invoegen2 (char nom [8]) { ofstream fichier; fichier.open("User",ios::app); fichier<<nom<<'\n'; fichier.close(); } int compare (char nom1 [8], char nom2 [8]) { int i; for (i=0 ; i<8 ; i++) { if (nom1[i]!=nom2[i]) {return 0;} } return 1; } int zoek2 (char nom [8]) { char x [8]; int i=1; ifstream fichier; fichier.open("User",ios::in); while(fichier>>x) { if(i==9 || compare(x,nom)==1) {return 1;} i++; } return 0; } int main () { slang s; bol b; char tab [10][20]; int point, temp; int i,mdj=0; int touche, test_einde, touchep; int niveau; int nbb; int gb; char suite; char nom [8]; char nomtemp [50]; int test; int place=0; presentatie(); de: system("cls"); gb=keuze_gebruiker(nom); ifstream fichier; if(gb==0) { cout<<endl<<"Gelieve uw naam in te tikken :"<<'\t'<<"(8 karakters max)"<<endl<<endl; cin>>nomtemp; if(strlen(nomtemp)>8) {goto de;} else strcpy(nom,nomtemp); if (zoek2(nom)==1) {cout<<endl<<endl<<"Gebruiker bestaat al, of kan niet toegevoegd worden.."<<endl; getch(); goto de;} invoegen2(nom); system("cls"); } else {if (gb==2) {goto einde;}} system("cls"); fichier.open(nom,ios::in); int tp; if ((fichier>>tp)==0) {init_beste_score(nom);} fichier.close(); fichier.open("score",ios::in); if ((fichier>>tp)==0) {init();} fichier.close(); deb:niveau=0; test_einde=0; test_einde=menu (nom); system("cls"); if(test_einde==1) {goto einde;} if(test_einde==2) {goto de;} deb2:nbb=0; gb=150; mdj=spel_modus(); if(mdj!=1 && mdj!=2 && mdj!=3) {goto deb;} else {if (kies_spel(temp,niveau,mdj)==1) {system("cls");goto deb2;}} touchep=0; touche='q'; system("cls"); init_slang(s); point=0; tir_bol(s,b); while(!verloren(s)) { touchep=touche; if (kbhit()) touche=getch(); if(touche!=27 && touche!='p' && touche!='P' && touche!='Z' && touche!='z' && touche!='q' && touche!='Q' && touche!='s' && touche!='S' && touche!='d' && touche!='D') {touche=touchep;} kansberekening(s,touche,touchep); for(i=0 ; i<temp; i++) {;} if (touche==27) {goto einde1;} if (touche=='p' || touche=='P') {cout<<endl<<"\t\t PAUSE"<<endl; pause:touche=getch(); if(touche=='p' || touche=='P' || (touche!='Z' && touche!='z' && touche!='q' && touche!='Q' && touche!='s' && touche!='S' && touche!='d' && touche!='D')) {goto pause;}} schoonmaak(tab); system("cls"); if (mdj==2) {mode2(s,b,point,temp,touche);} if(nbb==5) { if (mdj==3) { if(mode4(s,b,point,touche,0,gb)==1 || gb<=50) {if(gb<=50) {tir_bol(s,b);} nbb=0; gb=156;} } if (mdj==1) { if(mode4(s,b,point,touche,1,gb)==1 || gb<=50) {if(gb<=50) {tir_bol(s,b);} nbb=0; gb=156;} } gb=gb-6; } else { if (mdj==1) {if (mode1(s,b,point,touche,niveau)==1) {nbb++;}} if (mdj==3) {if (mode3(s,b,point,touche,niveau)==1) {nbb++;}} } beeld(s,b,tab,point,nbb,gb); } einde1:system("cls"); cout<<"GAME OVER"<<endl<<endl; cout<<endl<<"Behaalde score : "<<point<<" punten.!"<<endl<<endl<<endl; test=beste_score(point,nom,nom); if(test==1) {cout<<endl<<"Gefeliciteerd, u verbeterd uw punten !"<<endl<<endl;} test=beste_score(point,"score",nom); if (test==1) {cout<<endl<<"Gefeliciteerd, u komt in de TOP 10 !"<<endl<<endl;} cout<<endl<<endl<<"Klik enter om verder te gaan..."<<endl; suite=0; while (suite != 015) { suite=getch(); } goto deb; einde:system("cls"); cout<<endl; cout<<" *****************"<<endl; cout<<" * GAME OVER *"<<endl; cout<<" *****************"<<endl; cout<<endl<<"Klik op een toets om programma ..."<<endl; getch(); }
Cf ici
Ressources proposées par 3DArchi - Les fonctions virtuelles en C++ - Cours et tutoriels C++ - FAQ C++ - Forum C++.
Vous avez un bloqueur de publicités installé.
Le Club Developpez.com n'affiche que des publicités IT, discrètes et non intrusives.
Afin que nous puissions continuer à vous fournir gratuitement du contenu de qualité, merci de nous soutenir en désactivant votre bloqueur de publicités sur Developpez.com.
Partager