I can use __LINE__
as a method parameter just fine, but I would like an easy way to use it in a function that uses strings.
For instance say I have this:
sprintf(newStringBuffer, "myTest line %d: testcondition failed\n", __LINE__);
should do it c style. I know that there are ways and ways of doing this with the C++ string libraries.
You could also use strcat() or strncat or any other number of C libs to do this.
cout <<"String" + __LINE__ + " another string"
will work as well.