but I dont understand you
I think so too 
Your code is dangerous, because it assumes the caller of your operator is giving you an array which has "" at the end, I am not even talking about you not checking for a valid pointer 'data', but that is another issue.
Why don't use std::string or QString as input type?
It will make your code safer, and syntactically easier.
How can I know the end of << feeding
I answered that in my previous post.
You don't need to know.
Each operator<<() call takes one argument, and returns a value of some type which you call operator<<() again.
The call ends when all the object instances called their operator<<().
This line:
w_debug()<<"a word"<< data1<<"a word"<< data2;
w_debug()<<"a word"<< data1<<"a word"<< data2;
To copy to clipboard, switch view to plain text mode
Is the same as:
w_debug()<<"a word"; //return instance ofw _debug() on which the next call is done
w_debug()<<data1; //return instance of w_debug() on which the next call is done
w_debug()<<"a word";//return instance of w_debug() on which the next call is done
w_debug()<<data2;
w_debug()<<"a word"; //return instance ofw _debug() on which the next call is done
w_debug()<<data1; //return instance of w_debug() on which the next call is done
w_debug()<<"a word";//return instance of w_debug() on which the next call is done
w_debug()<<data2;
To copy to clipboard, switch view to plain text mode
Bookmarks