class Foo {
public:
operator std::string() const { return "I am a foo!"; }
};
...
Foo foo;
std::cout << foo; // Will print "I am a foo!".
Code Example |
---|
Cpp :: c++ builder |
Cpp :: Converting to string c++ |
Cpp :: error handling in c++ |
Cpp :: creare array con c++ |
Cpp :: how can we create 4 digit random number in c++ |
Cpp :: slice a vector c++ |
Cpp :: dynamic allocation c++ |
Cpp :: print counting in c++ |
Cpp :: quicksort |
Cpp :: c++ lettura file |
Cpp :: c++ Least prime factor of numbers till n |
Cpp :: c++ #include |
Cpp :: attention nlp |
Cpp :: c++ get pointer from unique_ptr |
Cpp :: map in cpp |
Cpp :: stl function to reverse an array |
Cpp :: is anagram c++ |
Cpp :: c++ vector |
Cpp :: how to sort array in c++ stockoverflow |
Cpp :: print hola mundo |
Cpp :: prevent copy c++ |
Cpp :: draw line sfml |
Cpp :: what is a variable in cpp |
Cpp :: even and odd in c++ |
Cpp :: read a whole line from the input |
Cpp :: C++ detaching threads |
Cpp :: c++ print array of arrays with pointer |
Cpp :: how to use power in c++ |
Cpp :: priority queue in cpp |
Cpp :: split text c++ |