Hi iam begginer at c++ i have class with static methods and i cant access them it throws me an error
1>------ Build started: Project: CPractice, Confi
Since name is a static data member you should initialize it :) and not count on the default instance related constructor.
Add this after the class definitions (yep, I know its confusing since your member is a private one, but this is only an initialization) :
string CPractice::name;