Bonjour
Débutant en C++ et reprenant "texto" un programme d'un livre le compilateur détecte une anomalie en ligne 20 (en rouge) et ainsi libellée
in member function point::affiche() sting ";" before string constant

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
include <iostream>
using namespace std;
struct point
{      
       int x;
       int y;
       void initialise (int, int);
       void deplace (int, int);
       void affiche ();
};
void point :: initialise (int abs, int ord)
 {      x = abs ; y = ord;
}
void point :: deplace (int dx, int dy)
{
     x  +=dx;
     y  += dy;
}
void point :: affiche ()
{    cout << "Je suis en" << x " " <<y "\n";}
main ()
{    a.initialise (5, 2); a.affiche ();
     a.deplace (-2, 4); a.affiche ();
     b.initialise (1, -1) ; b.affiche ();
     }