Here is my main. All I am trying to do is create an object of the class file, this is probably a very noobish question so sorry, just need to know what I'm doing wrong.
#include <iostream>
#include "Player.h"
using std::cout;
using std::cin;
int main()
{
cout << "Hello and welcome to the student adventures game.\n";
Player player1();
}
You declared a function which return Player type, see most vexing parse
To define an object, try update
Player player1();
to
Player player1;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With