I want to pass a value to my function with the idea of to mean 'end'.
Now I'm passing "@" but I dont like to use a char in particular.
My funcion recieves data using << operator, I save it to a sstream, and at the end I want to 'print' it to my window, to the qt debug area or to a log file.
I have:
my_debug<<"The a_data is:"<<a_data<<"the b_data is:"<<b_data<<"@";
my_debug<<"The a_data is:"<<a_data<<"the b_data is:"<<b_data<<"@";
To copy to clipboard, switch view to plain text mode
but I think tha something like this is more clear:
my_debug<<"The a_data is:"<<a_data<<"the b_data is:"<<b_data<<NULL;
my_debug<<"The a_data is:"<<a_data<<"the b_data is:"<<b_data<<NULL;
To copy to clipboard, switch view to plain text mode
Because I dont know how to tell my function to do what I want with this line :
[CODE] my_debug<<"The a_data is:"<<a_data<<"the b_data is:"<<b_data;
My << operators are similar to : (one for each type)
mydebug & mydebug::operator << (std::string data) {
os<<data;
return *this;
}
mydebug & mydebug::operator << (std::string data) {
os<<data;
return *this;
}
To copy to clipboard, switch view to plain text mode
Thanks
Bookmarks