how to avoid duplicate class in c++ without namespace -
just guess situation main.cpp should include both 'a.h' , 'b.h', , class 'c' defined in both a.h , b.h member functions's names same differnt, version of class 'c' different. but, main.cpp require both version of class 'c'.
then how avoid errors issue??
don't try define 2 different classes same (fully qualified) name; that's not allowed. rename 1 of them, or put in different namespace.
Comments
Post a Comment