Places a single character in the output stream.
basic_ostream<charT, traits>& put(char_type c);
The unformatted function put() inserts one character in the output stream. If the operation fails, it calls setstate(badbit).
The this pointer is returned.
#include <iostream> int main() { using namespace std; char *str = "CodeWarrior \"Software at Work\""; while(*str) { cout.put(*str++); } return 0; }
Result:
CodeWarrior "Software at Work"