I am having some problems while compiling c++ on Atom. I had been getting an error trying to link a header file with my source. And without changing anything, it suddenly ran properly after one day. Now, I am trying to compile two source files and a header one and I am getting an error saying class not declared in this scope. These are my files:
Source1:
#include <iostream>
#include "mine.h"
using namespace std;
int main() {
Perfect parfait ;
parfait.opa();
parfait.part();
return 0;
}
Source 2:
#include <iostream>
#include "mine.h"
using namespace std;
void Perfect::opa() {
cout << "Numerai" << endl;
}
int Perfect::part() {
int i = 2+4;
return i;
}
Header file:
#include <iostream>
#ifndef FILE_H_
#define FILE_H_
class Perfect {
public:
opa();
part();
};
#endif