资源 [英] Source

查看:74
本文介绍了资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码是什么意思?


struct GUID * guid = {0};


是否类似于C ++虚拟功能?


比尔


----- =通过Newsfeeds.Com发布,未经审查的Usenet新闻= -----
http://www.newsfeeds.com - 世界排名第一的新闻组服务!

----- ==超过100,000个新闻组 - 19个不同的服务器! = -----

解决方案

Bill Cunningham< no **** @ net.net>潦草地写道:

以下代码是什么意思?
struct GUID * guid = {0};


它初始化一个指向struct GUID的指针,无论struct GUID是什么。

指针当前没有指向任何结构GUID。

它是否类似于C ++虚函数?




No.


-

/ - Joona Palaste(pa*****@cc.helsinki.fi)----- ---------------------- \

| 飞翔的柠檬树中的金鸡王G ++ FR FW + M-#108 D + ADA N +++ |

| http://www.helsinki.fi/~palaste W ++ B OP + |

\ -----------------------------------------芬兰的规则! ------------ /

" To doo bee doo bee doo。"

- Frank Sinatra


" Bill Cunningham" <无**** @ net.net>写在

新闻:3f ******** @ corp.newsgroups.com:

以下代码是什么意思?

struct GUID * guid = {0};

是否类似于C ++虚函数?




No.意味着,创建一个指向struct GUID的指针,并将这个新的

指针初始化为0.这里不需要{}。我会把它写成:


struct GUID * pGuid = NULL;


但是如果我真的想要一个GUID对象,而不是指向一个的指针,

初始化为零我需要写:


struct GUID guid = {0};





struct GUID guid;


memset(guid,0,sizeof guid);


-

- 马克 - >

-


" Bill坎宁安" <无**** @ net.net>在消息中写道

news:3f ******** @ corp.newsgroups.com ...

以下代码是什么意思?

struct GUID * guid = {0};


创建一个类型为''指向struct GUID''的对象,

并将其初始化为NULL。 (大括号是可选的。)

是否类似于C ++虚函数?




完全没有。与任何类型的功能无关。


-Mike


What does the following code mean?

struct GUID *guid ={0};

Is it similar to a C++ virtual function?

Bill

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

解决方案

Bill Cunningham <no****@net.net> scribbled the following:

What does the following code mean? struct GUID *guid ={0};
It initialises a pointer to struct GUID, whatever struct GUID is. The
pointer is currently not pointing at any struct GUID.
Is it similar to a C++ virtual function?



No.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"To doo bee doo bee doo."
- Frank Sinatra


"Bill Cunningham" <no****@net.net> wrote in
news:3f********@corp.newsgroups.com:

What does the following code mean?

struct GUID *guid ={0};

Is it similar to a C++ virtual function?



No. It means, create a pointer to a struct GUID and initialize this new
pointer to 0. The {} are not necessary here. I''d write this as:

struct GUID *pGuid = NULL;

But if I actually wanted a GUID object, and not a pointer to one,
initialzed to zero I''d need to write:

struct GUID guid = { 0 };

or

struct GUID guid;

memset(guid, 0, sizeof guid);

--
- Mark ->
--


"Bill Cunningham" <no****@net.net> wrote in message
news:3f********@corp.newsgroups.com...

What does the following code mean?

struct GUID *guid ={0};
Create an object of type ''pointer to struct GUID'',
and initialize it to NULL. (the braces are optional).
Is it similar to a C++ virtual function?



Not at all. Nothing to do with a function of any kind.

-Mike


这篇关于资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆