Fixed setMethods for c++