0
I’m starting my studies in c++, and I’m not able to divide them into different files, if you can help me
Master code
#include <iostream>
#include "Celular.h"
using namespace std;
int main(int argc, char** argv)
{
Celular motorola();
motorola.ligar();
return 0;
}
My point file. h
class Celular
{
public:
void ligar();
}
My cpp file, which implements the function
#include <iostream>
#include "Celular.h"
using namespace std;
Celular:: void ligar()
{
cout << "consegui" >>;
}
Huh!?
cout << "consegui" >>;
!? I think this one>>
shouldn’t be there. Or rather, usecout << "consegui" << endl;
– Victor Stafusa
It’s me confused, it’s just as a test, I’m starting today
– diogo.alves
The error does not seem to have to do with separating files, and the question is without relevant information to help, colco that the names of all files, including those that do not appear there in the code. Could be just distraction and typo.
– Maniero