最好的C工具 [英] Best C tool

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

问题描述

嗨C专家,


请建议我最好的c编程语言工具,就像

Jbuilder(适用于java),它建议所有可用的方法等打字时

对象。


祝你好运,


Rajnish

Hi C experts,

Please suggest me best c programming language tool, which is like
Jbuilder (for java) which suggest all avilable methods etc on typing
the object.

Best regards,

Rajnish

推荐答案

ra ********* @ hotmail.com (Rajnish)在

新闻中写道:df ************************** @ posting.google。 c om:
ra*********@hotmail.com (Rajnish) wrote in
news:df**************************@posting.google.c om:
嗨C专家,

请建议我最好的c编程语言工具,这就像是Jbuilder(适用于java)的建议关于打字的所有可用方法等
对象。
Hi C experts,

Please suggest me best c programming language tool, which is like
Jbuilder (for java) which suggest all avilable methods etc on typing
the object.




您对C语言有什么疑问?我们不在这里讨论工具

(官方)。


-

- 马克 - >

-



What is your question about the C language? We don''t discuss tools here
(officially).

--
- Mark ->
--


" Rajnish" < RA ********* @ hotmail.com>在留言中写道

news:df ************************** @ posting.google.c om ...
"Rajnish" <ra*********@hotmail.com> wrote in message
news:df**************************@posting.google.c om...
嗨C专家,

请建议我使用最好的c编程语言工具,就好像是Jbuilder(适用于java),它建议所有可用的方法等等。对象。
Hi C experts,

Please suggest me best c programming language tool, which is like
Jbuilder (for java) which suggest all avilable methods etc on typing
the object.




看来你误解了C是什么以及它是如何工作的。

C确实有''对象''(简单地定义为''存储区''),

但它们不能自动与''方法'相关联'

(' C语言中的函数与Java或C ++一样。 C有一个构造

''struct''(非常类似于C ++类),可以使用

进行合成和聚合,但不允许使用函数

成员(但指向函数的指针)。


最近的成员可以进行模拟,例如一个C ++成员函数

(我只是熟悉Java,所以我不会去那里)

是这样的:


#include< stdio.h>

struct T

{

int member;

int(* get_m)();

};


int get_m(const struct T * arg)

{

返回arg->会员;

}


int main()

{

T obj = {42,get_m};

printf("%d \ n",get_m(& obj));

返回0;

}


请注意,没有办法实现''私有''数据,即

客户端代码可以不加选择地修改任何''obj'的内部结构。


如果你正在寻找编写面向对象代码的语言,那么

然后C不是你想要的。 (它*可以在C中完成,

但是''手工'',你没有得到任何自动''安全

蚊帐' C ++和Java都有。它也很乏味。。

-Mike



It seems you''re misunderstanding what C is and how it works.
C does have ''objects'' (defined simply as ''regions of storage''),
but they cannot be ''automatically'' associated with ''methods''
(''functions'' in C) as they can with Java or C++. C has a construct
''struct'' (which is very similar to a C++ class) which one can use
for composition and aggregation , but functions are not allowed as
members (but pointers to functions are).

The closest one can get to simulating e.g. a C++ member function
(I only have a passing acquaintance with Java so I won''t go there)
is something like:

#include <stdio.h>
struct T
{
int member;
int (*get_m)();
};

int get_m(const struct T *arg)
{
return arg->member;
}

int main()
{
T obj = {42, get_m};
printf("%d\n", get_m(&obj));
return 0;
}

Note that there''s no way to implement ''private'' data, i.e.
client code can modify any of ''obj''s internals indiscriminately.

If you''re looking for a language for writing object oriented code,
then C is not what you''re looking for. (It *can* be done in C,
but ''by hand'', and you don''t get any of the automatic ''safety
nets'' that C++ and Java have. It''s quite tedious too.).
-Mike


Rajnish写道:
Rajnish wrote:

你好C专家,

请建议我最好的c编程语言工具,就像
Jbuilder(适用于java),它建议所有可用的方法等等。对象。

Hi C experts,

Please suggest me best c programming language tool, which is like
Jbuilder (for java) which suggest all avilable methods etc on typing
the object.



你的问题毫无意义。没有与C

对象关联的方法。结构和联合将具有关联的数据成员。我不知道任何有助于此的IDE。


Brian Rodenborn


Your question makes no sense. There are no methods associated with C
objects. Structs and unions will have associated data members. I don''t
know of any IDEs that help with that.

Brian Rodenborn


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

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