This is serious stuff guys. Here is what I am working with.....
I wrote the IString class and it works when tested but when this other guy uses my class for two of his applications the one application works and the other does not. This is the function he wrote and he is using it in both his applications:
It is called like this, see the code below, in both the applications but one works and the other returns junk. But when I print the value inside user_name they are there but they are not returned. Any ideas? I have treid 20 different things and I still can't get it to work.Code:char * user_name(){ return (IString::upperCase(getlogin())); }
Code:char sCreateuser[15]; char sUpdateuser[15]; strcpy(sCreateuser,user_name()); strcpy(sUpdateuser,user_name()); cout<< sCreateuser <<endl; cout<< sUpdateuser <<endl;