结构指针 [英] Structure Pointer

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

问题描述



当我这样使用时,我有一些警告

struct creat_table {

-------- < br $> b $ b ----------

};

struct creat_table * table();

int main()

{

struct creat_table * p;

p = table();

}

struct creat_table * table()

{


}

我曾经得到一些警告,如

不兼容的任务如果有任何机构找到解决方案,你可以使用它来支付它吗

解决方案

< BLOCKQUOTE>" RAKHE" < t。*************** @ gmail.comwrites:


当我像这样使用时,我有一些警告

struct creat_table {

--------

----------

};

struct creat_table * table();

int main()

{

struct creat_table * p;

p = table();

}

struct creat_table * table()

{


}

我曾经得到一些警告,比如

不兼容的任务如果有任何身体找到解决方案可以你

expalin it



请不要使用愚蠢的缩写,例如u。如果您希望我们花时间阅读您的文章,请花点时间拼出单词。


清理完您发布的代码后(删除--------行,

在结构中添加一个虚拟成员),编译时没有错误。

我的结论是你发布的代码与'

给你警告的代码不同。我们不是思想家;除非你真的把它展示给我们,否则我们不可能告诉

你的代码有什么问题。


你说你有一个警告类似的东西不兼容

分配。不要告诉我们警告是什么样的;告诉我们

到底是什么。


写一个小的完整的可编译程序来说明

问题。准确地发布(复制粘贴,不要重新打字),并告诉我们

问题是什么。


如果你'要发布到新闻组,最好先读一下

组,或者至少浏览档案。如果你已经完成了

,那么这个回复就没有必要了,因为我所说的所有内容已经多次在这里发布了
$


-

Keith Thompson(The_Other_Keith) ks *** @ mib.org < http://www.ghoti.net/~kst>

圣地亚哥超级计算机中心< *< http://users.sdsc.edu/~kst>

我们必须做点什么。这是事情。因此,我们必须这样做。


2007年2月22日20:42:19 -0800,RAKHE < t。*************** @ gmail.com>

写道:


>嗨

当我这样使用时,我有一些警告

struct creat_table {

--------
----------
};

struct creat_table * table();

int main()

{

struct creat_table * p;

p = table();

}

struct creat_table * table()

{


}
我曾经得到一些警告,比如

不兼容的任务请问,如果有任何身体找到解决方案可以告诉它



我真的很好奇为什么你选择命名你的结构

" ; creat_table"而不是create_table。我们有一个不称职的

程序员为我们工作,他们选择使用相同的命名约定,

我们总是想知道为什么他在世界上选择省略最后的''e ''

increate。我不是说你不称职 - 我只是想知道

你选择创造背后的理由是什么? (我们在创建上发音

" kreet")


祝你好运

-

jay


RAKHE写道:




我当我像这样使用时有一些警告

struct creat_table {

--------

------ ----

};

struct creat_table * table();

int main()

{

struct creat_table * p;

p = table();

}

struct creat_table * table()< br $>
{


}

我曾经得到一些警告,如

不兼容的作业请如果有的话找到解决方案可以u

expalin it



如果您需要帮助,请发布一个最小的,可编辑的程序

展示你的问题。使用剪切和粘贴,不要重新打字。如果相关,

发布编译器诊断的实际文本,而不是你改写的

版本。


Hi
I am having some warning when i used like this
struct creat_table {
--------
----------
};
struct creat_table *table();
int main()
{
struct creat_table *p;
p =table();
}
struct creat_table *table()
{

}
I used to get Some warning like
Incompatible assignment Please if any body find solution can u
expalin it

解决方案

"RAKHE" <t.***************@gmail.comwrites:

I am having some warning when i used like this
struct creat_table {
--------
----------
};
struct creat_table *table();
int main()
{
struct creat_table *p;
p =table();
}
struct creat_table *table()
{

}
I used to get Some warning like
Incompatible assignment Please if any body find solution can u
expalin it

Please don''t use silly abbrevations like "u". If you want us to take
the time to read your article, take the time to spell out the words.

After I cleaned up the code you posted (removing the "--------" lines,
adding a dummy member to the structure), it compiled without error.
My conclusion is that the code you posted differs from the code that''s
giving you the warning. We''re not mindreaders; we can''t possibly tell
you what''s wrong with your code unless you actually show it to us.

And you say you got a warning "something like" Incompatible
assignment. Don''t tell us what the warning is like; tell us what it
really is.

Write a small complete compilable program that illustrates the
problem. Post it exactly (copy-and-paste, don''t re-type), and tell us
what the problem is.

If you''re going to post to a newsgroup, it''s a good idea to read the
group for a while, or at least browse the archives. If you had done
so, this reply would not be necessary, because everything I''m saying
has already been posted here many many times.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.


On 22 Feb 2007 20:42:19 -0800, "RAKHE" <t.***************@gmail.com>
wrote:

>Hi
I am having some warning when i used like this
struct creat_table {
--------
----------
};
struct creat_table *table();
int main()
{
struct creat_table *p;
p =table();
}
struct creat_table *table()
{

}
I used to get Some warning like
Incompatible assignment Please if any body find solution can u
expalin it

I''m really curious as to why you chose to name your struct
"creat_table" instead of "create_table". We had an incompetent
programmer working for us who chose to use the same naming convention,
and we always wondered why in the world he chose to omit the final ''e''
in "create". I''m not saying you''re incompetent--I just want to know
what your rationale is behind choosing "creat" (which we pronounce
"kreet") over "create".

Best regards
--
jay


RAKHE wrote:

Hi
I am having some warning when i used like this
struct creat_table {
--------
----------
};
struct creat_table *table();
int main()
{
struct creat_table *p;
p =table();
}
struct creat_table *table()
{

}
I used to get Some warning like
Incompatible assignment Please if any body find solution can u
expalin it

If you want assistance, please post a minimal, compilable program that
exhibits your problem. Use cut and paste, don''t retype. If relevant,
post the actual text of the compiler''s diagnostics, not your rephrased
version.


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

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