Visual Studio #pragma once

1k views Asked by At

I use the IDE Visual Studio 2013.

Visual Studio has a non-standard but widely supported preprocessor directive:

#pragma once

This replaces #include guards and removes any possibility of name confliction with less code. My question is that is there any disadvantage to using this, for example decreased portability?

1

There are 1 answers

0
Ed Heal On

It is less portable. It works. But then again you are working in the windows environment for why not!