1stProject

Hello everyone I am new in programming and I wish to know or are my faults his fact in Mons three hours that I seek and that I thank you do not find anything me to say them so that I can realizes there :


#include <iostream>
#include <string>

using namespace std;

/*
Fonction principale "main"
*/

int main ()

{}


string nomUtilisateur ("GamblinLucas")
cout << "Projet 1" << endl;

int ageUtilisateur(15);
//CDL

int nbAmis(423);
//NARS

bool facebook(true)

//RS?

}

int main ()

{}
int ageUtilisateur(16);

cout << "Votre age est : ";

cout << "ageUtilisateur: ";

//Compilation Calcul 16

int ageUtilisateur(16);
cout << "Votre age est : " << ageUtilisateur << endl;

int qiUtilisateur(150);

string nomUtilisateur("GamblinLucas");
cout << "Vous vous appelez " << nomUtilisateur << " et votre QI vaut " << qiUtilisateur << endl;

}
// Result:150 , GamblinLucas
return 0;

wut
What are you doing bro ?????
At least explain what you want to do ????
I will put corrections using comments in your code.
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
 
#include <iostream>
#include <string>

using namespace std;

/*
Fonction principale "main"
*/

int main ()

{}//delete, it should be {


string nomUtilisateur ("GamblinLucas") 
//string nomUtilisateur = "GamblinLucas";
cout << "Projet 1" << endl;

int ageUtilisateur(15);//int ageUtilisateur = 15;
//CDL

int nbAmis(423);//int nbAmis = 423;
//NARS

bool facebook(true)//;

//RS?

}//remove

int main ()//remove 

{}//remove
int ageUtilisateur(16);//int ageUtilisateur = 16;

cout << "Votre age est : ";
//cout << "Votre age est : " << ageUtilisateur << endl;

cout << "ageUtilisateur: "; //remove

//Compilation Calcul 16

int ageUtilisateur(16);//remove
cout << "Votre age est : " << ageUtilisateur << endl;//remove

int qiUtilisateur(150);//int qiUtilisateur = 150;

string nomUtilisateur("GamblinLucas");//remove
cout << "Vous vous appelez " << nomUtilisateur << " et votre QI vaut " << qiUtilisateur << endl;

} 
// Result:150 , GamblinLucas
return 0;

I think I did what you asked, not sure though.
Look at this for more information http://images.devshed.com/ds/stories/Basic_Ideas/image%202.jpg
Lines 17, 20, 23, 35etc. Those are not errors, but correct initialization of variables.
Sorry for not mentioning that, thank you for the clarification!
Ty man !
Ty man !

Your welcome :) Make sure to click on the button at the top of this page that says "mark as solved".
Topic archived. No new replies allowed.