Question

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?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top