Header File:
CPP FileCode:cSTRING& Reverse();
DRIVER FILE:Code:cSTRING& cSTRING::Reverse () { cout << "INSIDE REVERSE" << endl; int nCnt = strlen(pszName1)-1; for (int x=0; x<strlen(pszName1); x++) { pszName1[x]=pszName1[nCnt]; nCnt+=-1; } for (int x=0; x<strlen(pszName1); x++) cout << pszName1[x]; return *this; }
For some reason it does not even enter the function.Code:cout << "\n\nNow reversing:::::" << endl; cSTRING s5; s2.Reverse();



LinkBack URL
About LinkBacks


