Reputation: 6171
To my understanding Visual Studio C++ projects use #pragma once
in the very top of header files to prevent multiple inclusion.
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.
Upvotes: 1
Views: 1154
Reputation: 3561
Yes, really, #pragma once
originates from Microsoft C++, but nowadays it is supported by at least two another most used modern C++ compilers (i.e GCC and clang). So you should not have a problems with it.
Upvotes: 1