here is the code
#include <iostream>
#include <string>
#include "char.h"
#include "user.h"
bool user::readYN (string ans)
{
    ans = tolower (ans);
    if (ans == "y" || ans == "yes")
    {
        return true;
    }
    else if (ans == "n" || ans == "no")
    {
        return false;
    }
    else 
    {
        std::cout<<playr.inputErr;
        return false;
    }
}
The string ans is passed to it from my main.cpp and should be a y\n to confirm a charecter name. However whenever I try to compile this I get the error
user.cpp:6: parse error before '{'
and the errer
user.cpp:8: parse error before '+'
I have no idea where it is getting an error for the { and I don't know where it see's a +(my thinking is the equal... maybe???) All my other code has compiled and I just want to start actually building stuff.
EDIT: By request the header files are as follows
user.h
#ifndef user
#define user
#include<string>
class user
{
    public:
        string input;
        static string inputErr;
        bool readYN(string);
        void read(string);
}playr;
#endif
and char.h
#ifndef chara
#define chara
#include<string>
class charecter
{
    public:
        string name;
        bool yes;
        int HP;
        void nameMe(string);
}chara;
#endif
 
    