A decent note for readability:
You can save the JSONDeserializer:: qualifier with the definition in your implementation file (* .cpp).
As long as your class declaration (as others have mentioned) has no qualifier, g ++ / gcc will play well.
For example:
In myFile.h:
class JSONDeserializer { Value ParseValue(TDR type, const json_string& valueString); };
And in myFile.cpp:
Value JSONDeserializer::ParseValue(TDR type, const json_string& valueString) { do_something(type, valueString); }
When myFile.cpp implements methods from many classes, it helps to find out who belongs to whom simply by looking at the definition.
bunkerdive Apr 24 '15 at 20:47 2015-04-24 20:47
source share