0

I had written a custom logging function which accepts a printf like format strings and gcc provides __attribute__ (format) for format string checks, is there a equivalent option in Visual C++ ?

vine'th
  • 4,890
  • 2
  • 27
  • 27
  • 3
    Possible duplicate of [__attribute__((format(printf, 1, 2))) for MSVC?](http://stackoverflow.com/questions/2354784/attribute-formatprintf-1-2-for-msvc) – Frédéric Hamidi Nov 06 '11 at 08:55
  • yes, duplicate of the above question, good if someone can close this question. Thanks for pointing out. – vine'th Nov 06 '11 at 08:57
  • Does this answer your question? [\_\_attribute\_\_((format(printf, 1, 2))) for MSVC?](https://stackoverflow.com/questions/2354784/attribute-formatprintf-1-2-for-msvc) – 273K Feb 07 '23 at 16:43

1 Answers1

0

Perhaps not, but you might use some variant of GCC (MinGW?) on your system.

Or you could even install a Linux system on your machine...

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547