How can I use #pragma message() so that the message points to the file(lineno)?
-
12-11-2019 - |
Frage
In order to add 'todo' items into my code, I want to put a message in the compiler output.
I would like it to look like this:
c:/temp/main.cpp(104): TODO - add code to implement this
in order to make use of the Visual Studio build output functionality to navigate to the respective line by double-clicking it.
But the __LINE__
macro seems to expand to an int
, which disallows writing
#pragma message( __FILE__ "("__LINE__"): ..." )
Would there be another way?
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow