Below are my 3 cpp files and 2 header files. I received an astronomical amount of errors and most are very unclear. I am very new to c++ and have a C#/Java background.
Its clear to me that the below are likely syntax errors. Thanks for the help in advance.
Main.cpp:
#include <iostream>
#include "B.h"
#include "S.h"
using namespace std;
int main() {
B b;
S s("Jon");
return 0;
};
B.h:
#ifndef B_H
#define B_H
class B {
public:
B();
};
#endif
B.cpp:
#include <iostream>
#include <string>
#include "B.h"
#include "S.h"
using namespace std;
class B {
public:
B() {}
};
S.h:
#ifndef S_H
#define S_H
class S: public B {
public:
S(string name);
}
#endif
S.cpp:
#include <iostream>
#include <string>
#include "B.h"
#include "S.h"
using namespace std;
class S: public B {
private:
string s;
public:
S(string name) {
s = name;
}
};
Here is my huge list of errors. It's a little overwhelming.