1 #include "IntAndString.h" 2 3 #include <string> 4 5 using namespace std; 6 IntAndString()7IntAndString::IntAndString() : 8 fString(string("")), 9 fInt(0) 10 { 11 } 12 IntAndString(const char * str,int arg)13IntAndString::IntAndString(const char* str, int arg) : 14 fString(std::string(str)), 15 fInt(arg) 16 { 17 } 18 GetString()19const char* IntAndString::GetString() { 20 return fString.c_str(); 21 } 22 SetValue(int arg)23void IntAndString::SetValue(int arg) { 24 fInt = arg; 25 } 26 SetValue(const char * arg)27void IntAndString::SetValue(const char* arg) { 28 fString = string(arg); 29 } 30 31