5

Appending << and >> to a char *

view full story
linux-howto

http://www.unix.com – I am writing a C++ function so I can pass a name and message I will call as Code: pr_error(stream,3,"name","message"); hoping to get Code: <<name>> message However I am running into problems with my function shown below when trying to append ">>". Code: void pr_error (   FILE*  stream,   int    shift,   const char*  name,   const char*  msg ) {   using namespace std;   char*  s;   s = const_cast<char *>(name);   //strcat (s, (HowTos)