且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

pragma一次

更新时间:2022-05-04 00:45:39

不要使用微软特定的东西


使用

----------- ------

#ifndef __MY_HEADER_FILE_H__

#define __MY_HEADER_FILE_H__


//我的代码在这里


#endif // __MY_HEADER_FILE_H__

-----------------

而不是

-----------------

#pragma曾经


//我的代码在这里

-----------------
Dont use microsoft specific things

Use
-----------------
#ifndef __MY_HEADER_FILE_H__
#define __MY_HEADER_FILE_H__

// my code here

#endif // __MY_HEADER_FILE_H__
-----------------
instead of
-----------------
#pragma once

// my code here
-----------------


但是我想在我的microsoft编译器中使用pragma once指令。是否

你知道其他选择吗?


提前再次感谢

雅各布


"< - Chameleon - >" &LT; CH ****** @ hotmail.NOSPAM.com&GT;在消息中写道

新闻:c4 ********** @ nic.grnet.gr ...
But I want to use the pragma once directive with my microsoft compiler. Is
there no other option in to your knowledge?

Thank you again in advance
Jacob

"<- Chameleon ->" <ch******@hotmail.NOSPAM.com> wrote in message
news:c4**********@nic.grnet.gr...
不要使用微软特定的东西

使用
-----------------
#ifndef __MY_HEADER_FILE_H__
#define __MY_HEADER_FILE_H__

//我的代码在这里

#endif // __MY_HEADER_FILE_H__
-----------------
而不是
--- --------------
#pragma曾经

//我的代码在这里
------------ -----
Dont use microsoft specific things

Use
-----------------
#ifndef __MY_HEADER_FILE_H__
#define __MY_HEADER_FILE_H__

// my code here

#endif // __MY_HEADER_FILE_H__
-----------------
instead of
-----------------
#pragma once

// my code here
-----------------



但是我想用myoft编译器使用pragma once指令。是否

你知道其他选择吗?


提前再次感谢

雅各布


"< - Chameleon - >" &LT; CH ****** @ hotmail.NOSPAM.com&GT;在消息中写道

新闻:c4 ********** @ nic.grnet.gr ...
But I want to use the pragma once directive with my microsoft compiler. Is
there no other option in to your knowledge?

Thank you again in advance
Jacob

"<- Chameleon ->" <ch******@hotmail.NOSPAM.com> wrote in message
news:c4**********@nic.grnet.gr...
不要使用微软特定的东西

使用
-----------------
#ifndef __MY_HEADER_FILE_H__
#define __MY_HEADER_FILE_H__

//我的代码在这里

#endif // __MY_HEADER_FILE_H__
-----------------
而不是
--- --------------
#pragma曾经

//我的代码在这里
------------ -----
Dont use microsoft specific things

Use
-----------------
#ifndef __MY_HEADER_FILE_H__
#define __MY_HEADER_FILE_H__

// my code here

#endif // __MY_HEADER_FILE_H__
-----------------
instead of
-----------------
#pragma once

// my code here
-----------------