To my understanding Visual Studio C++ projects use #pragma once in the very top of header files to prevent multiple inclusion.
#pragma once
And the same is achieved, in Qt Creator projects, with
#ifndef FILE_H #define FILE_H // Code here #endif
Let's say I got a Visual Studio project and I want to play with Qt Creator. How to deal with the #pragma once issue?
If possible I don't want to edit all header files.
Yes, really, #pragma once originates from Microsoft C++, but nowadays it is supported by two another most used modern C++ compilers (i.e GCC and clang). So you should not have a problems with it.
1.4m articles
1.4m replys
5 comments
57.0k users