English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2007-01-08 18:41:10 · 2 answers · asked by Imtiyaz S 1 in Computers & Internet Programming & Design

As of VC++ 2005, which is better. Thnx. As i undestand, if I am using only windows, i can use pragma else use ifndef?

2007-01-08 19:37:55 · update #1

2 answers

#pragma is windows' way of handling things. use #ifndef is better for actual software development.

2007-01-08 18:46:34 · answer #1 · answered by RMS4EVER 3 · 0 0

#pragma once is supported by only a small number of C++ compilers. What the previous poster was trying to say is that your code will not be portable unless you're using the other method:

#ifndef _SUFFICIENTLY_UNIQUE_CODE
#define _SUFFICIENTLY_UNIQUE_CODE


#endif

But, of course, the above is more error prone.

2007-01-08 19:14:35 · answer #2 · answered by sspade30 5 · 0 0

fedest.com, questions and answers