__FILE__
is replaced with "MyFile.cpp" by C++ preprocessor.
I want __LINE__
to be replaced with "256" string not with 256 integer.
Without using my own written functions like
toString(__LINE__);
Is that possible? How can I do it?
VS 2008
EDIT I'd like to automatically Find and Replace all throw;
statements with
throw std::runtime_error(std::string("exception at ") + __FILE__ + " "+__LINE__);
in my sources. If I use macro or function to convert __LINE__
into a string I'll need to modify each source file manually.