I have to read lines from a .txt file and want to initialize the members of my class with it. The first character in a line is always a number.
class myClass{
private:
const int ID;
public:
myClass(const int id){
this->ID = id;
}
};
Doing this gives me "Provides no initializer for Kontakt::ID" for the constructor and "expression must be a modifiable Ivalue" for this->ID = id;