include - How to make CLion use "#pragma once" instead of "ifndef ... def ..." by default for new header files? -
by default, clion add following lines newly created header file:
#ifndef some_name_h #define some_name_h .... code here #endif //some_name_h
but #pragma once
more. how can configure clion uses #pragma once
default new header files?
go file-> settings -> editor -> file , code templates
. find there 3 tabs, namely, templates
, includes
, , code
. under templates
choose example c header file. insert #pragma once
replace content. every time add new header project menu have template.
Comments
Post a Comment