I write a class which defines and uses const string
(This string defines a path or a part of the path)
Where should I define it : in cpp or h? should it be part of the class?
For now this data is used only inside internal member functions.
Which option is better?
myClass.h
// const std::string PATH = "Common\\Data\\input.txt" (1)
class MyClass
{
public:
// const std::string m_path = "Common\\Data\\input.txt" (2)
private:
// const std::string m_path = "Common\\Data\\input.txt" (3)
}
myClass.cpp
// const std::string PATH = "Common\\Data\\input.txt"(4)