It gives me a compilation error and I do not know why I could solve it? [closed]

-3
#Include <iostream>
using namespace std;

Class Ejemplo.                                 
{
Private:                                              
   Int  Variable_1;                             
   const int variable_2;                   
Public:
   Ejemplo(int a, int b);
   Ejemplo();
};

Ejemplo::Ejemplo(int a, int b)
:variable_1(a), variable_2(b)
{
    Cout << variable_1 << endl << variable_2 << endl;
}

Ejemplo::Ejemplo()
{
     Cout << "Mensaje" << endl;
)

Int main()
{
     const Ejemplo(10, 11);
     Ejemplo();

    rturn 0;
}
    
asked by Jhonaa 26.08.2017 в 06:32
source

1 answer

2

You have several typographical errors:
0. The point "." final after Class Example, spare | 00. is include instead of Include
1. is class instead of Class
2. is private instead of Private
3. is public instead of Public
4. is int instead of Int
5. is cout instead of Cout
6. You have defined Variable_1 and then in the call to the Example constructor (int a, int b) you use variable_1 7. The constructor Example :: Example (), you end the function with a ")" when you should do it with a "}" key
8. The const in variable_2 will give you problems if you do not initialize the variable in all constructors

    
answered by 26.08.2017 в 11:21