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.
__LINE__
For instance say I have this:
Try this?
string myTest(const int lineno) { if(!testCondition) return logError ("testcondition failed", lineno); } void logError (string msg, const int lineno) { clog << "line " << lineno << ": " << msg << endl; }