I am not sure how to ask this but here it goes; Lets say I have a class:
Then I use it:Code:class FILE { public: std::string sName; };
What I want is to check and make sure this doesnt happen. I want to ensure that each class has a unique sName. So how can I check or ensure this doesnt happen?Code:FILE f1; FILE f2; f1.sName = "Test.txt"; f2.sName = "Test2.txt";




Reply With Quote