Search Result

Collapse
2 results in 0.0023 seconds.
Keywords
Members
Tags
ostream
  •  

  • Gurinderc
    started a topic Modifying cout to display custom text at start
    in C

    Modifying cout to display custom text at start

    Hello,

    I'm working on, to write the debug statements to logfile or console depends on working environment.

    What I have did:

    Code:
    	
    	streambuf *psbuf;
    	ofstream logFile;
    	logFile.open(LOGFILE);
    
    	psbuf = logFile.rdbuf();
    	cout.rdbuf(psbuf);
    this cause cout to redirect the output to log and it's working fine.

    The situation is, I like...
    See more | Go to post

  • keit6736
    Guest started a topic template problem with ostream operator
    in C

    template problem with ostream operator

    Hi, I'm using the Borland compiler and I've created two templated
    classes in which I've overloaded the ostream << operator. However, when
    I try and use the operator on objects of either class I get the
    following error:



    Error: Unresolved external 'operator <<(std::basic_o stream<char,
    std::char_trait s<char> >&, const BinomialTree<in t>&)' referenced from
    ...
    See more | Go to post
Working...