There's my program... and in the implimentation file:Code:#include <iostream.h> #include "ooint.cpp" main() { ooint ooint1 = "100"; cout << ooint1 << " "; ooint1.intcat("1"); cout << ooint1 << " "; ooint1.intfcat("3"); cout << ooint1 << " " << "\n\n"; return 0; }
It gives me a weird error: (see attatchment on next post)Code:void ooint::intfcat(const char * Int1) { //char Int2[(strlen(Int1))+(strlen(CString))]; char Int2[1024]; for (int i=0; i<=strlen(Int1); i++) Int2[i] = Int1[i]; strcat(Int2,CString); strcpy(CString,Int2); }
If I click Ignore, it does what I want as output:
100 1001 31001



LinkBack URL
About LinkBacks


