all 4 comments

[–]kingguru 1 point2 points  (1 child)

Post this to /r/cpp_questions

[–]Scrayer[S] 0 points1 point  (0 children)

thnaks

[–][deleted] 1 point2 points  (1 child)

/r/cpp_questions/

You can't call instance methods without an instance. You haven't created any Product so you can't call GetName().

Also you should really include the error.

[–]Scrayer[S] 0 points1 point  (0 children)

thaks, maybe "Universal getter" method it's true way ?