Can't access private variable

Solved Solution
Last edited on
Line 20: You've declared cd() as const. That's telling the compiler you won't modify any member variables of the Path instance. Line 34 tries to change a member variable of the instance.

Since cd() logically changes the currentPath, you probably don't want cd() to be const.

Last edited on
Suppose you get this working, what would you like to do with it?

I am asking because I think you may have wondered a bit away from the easiest route to obtaining a goal (possibly any goal) here.
It's poor etiquette to remove your question after it has been answered. By doing this, you minimize the chances of helping anyone else who encounters a similar problem.
Topic archived. No new replies allowed.