Ok so I have been looking for a solution in the internet for nearly 2 hours and this has been bugging me seriously...
class Menu(){
private:
std::string();
};
works, but when I tried this however...
std::string("dkfjdkf");
it errors... now I dont know why or what Im doing wrong... but I tried lots of things it compiles sometimes but then most of the time it errors... please help me out Im stuck :(
i want to have a string as a class member... I can declare it, but I cant put a value on it... I have declared strings on main and on the class methods and I can assign a value to them just fine...
If you write std::string some_string();, you're declaring a function. If you write std::string some_string("dfdf"); you're declaring a string variable and assigning "dfdf" to it. You don't give enough information to know for sure, but I bet that your problem comes from that.