strcpy not working at all?!
Posted on 2002-03-22
Hi, I am trying to build a string based on the data the program parses so at the end, i can output a standard cout << everything; rather than awkard cout's varying in the programme or cout << x << y << " " << z;
this is for a h/w assignment, but the thing i am doing isnt assigned. i am just spicing up the programme with some cosmetic issues to make it look better and run better, etc...so i can learn string handling, etc.
below is the issues.
cout << "after strcat: " << alles;
~/275 $ g++ -o time2 timestamp.cc timedriver.cc
timestamp.cc: In member function `void TimeStamp::display()':
timestamp.cc:143: cannot convert `std::string' to `char*' for argument `1' to
`char* strcpy(char*, const char*)'