C语言问题:指向函数(B)的指针做结构体(A)的成员,而这个函数(B)的形参中有这个结构体(A)类型的.这个该怎...

C语言问题:指向函数(B)的指针做结构体(A)的成员,而这个函数(B)的形参中有这个结构体(A)类型的.这个该怎么理解?谢谢... C语言问题:指向函数(B)的指针做结构体(A)的成员,而这个函数(B)的形参中有这个结构体(A)类型的.这个该怎么理解?谢谢 展开
 我来答
栾涵桃
2011-05-14 · TA获得超过362个赞
知道小有建树答主
回答量:656
采纳率:0%
帮助的人:0
展开全部
c的结构体与c++的结构体的区别

答:标准C中定义,C语言中的结构体内是不能声明函数的
C++结构体中可以有函数的声明,不过他们都是历史遗留下来的产物
现在,应该避免使用结构体,因为结构体都可以由类来代替
你应该问类与结构的区别,类中如果不声明成员的访问控制属性,那么该成员默认是私有成员的,但是在结构题中,如果不进行显示说明,则默认访问属性是公有的

1:语言的内存分配有哪几种.?
答:不太明白你要问什么,不过访问内存是有两种方式,一种是直接通过变量名来访问,一种是间接访问,通过指针来访问,至于你说的内存分配的方式,有静态分配内存,当然也有动态内存分配,这个应该是你问的把

2:指针函数 与 函数指针的 区别.?
答:看名字你也应该有一定的理解了把
对于指针函数,踏的重心在函数,指针是修饰函数的,可以这么理解,那么它的重心既然是函数,则表示是定义了一个函数,至于是什么样的函数呢,由于是由指针修饰的,你就可以联想到,这个函数的返回类型是指针类型的
至于函数指针,他的重心是指针,函数是修饰指针的,则表示他是定义一个指针,但怎么理解呢,这是个什么样的指针呢,与我们平常所定义的指针不同,我们平常所定义的指针,是指向一个变量的,但是他与众不同的是,他不是指向一个变量,他是指向一个函数,直接使用指针名即可使用这个函数

3:冒泡排序的缺点是什么.?
答:冒泡排序的缺点是,每次排序只能冒出一个,要么是最大的要么是最小的元素,也就是说,你的循环做一趟,你才找出来一个元素,对于有n个元素,进行排序,则要循环n-1趟,才可以排好序.他的算法时间复杂度是n-1
你可以对比一些快序的排序算法,就知道了他的缺点了,他的效率不太高,你可以写两个以不同的算法实现的一个排序程序,比较下两个程序的优劣就知道了

上面已尽自己的最口语话的描述了,楼主应该可以看的明白把
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
airmaxshoppe
2011-05-14 · TA获得超过399个赞
知道答主
回答量:459
采纳率:0%
帮助的人:105万
展开全部
Romancing the Stars
AS Carrie Bradshaw would have recognized, a museum's cultivation of a possible patron is a form of courtship, using the same flirtation, grand gestures, ardent hopes for a future together ?a and then, occasionally, needless to say, the realization that the individual you are wooing is, properly, just not that into you.The last was the case for the Brooklyn Museum lately, where Sarah Jessica Parker's agreement to serve as "honorary co-chair" at its April gala, basically just lending her name to the event, kindled museum executives' dreams of a long-term relationship, involving far more events and possibly even at some point a seat on the museum's board of trustees.

Then, as the date of the gala approached, there was poor news. Ms. Parker had a conflict ?a she could remain only for cocktails. On the evening in question, she stayed for a half-hour, posing for photos in her Chanel coat and bejeweled Manolo Blahniks and permitting herself to be ushered by a publicist into a rather unnatural t?§ote-?§?è-t?§ote with her co-host, Liv Tyler, to ensure that photographers could get a shot of the two actresses together. She complimented the option of the evening's theme, which was honoring Brooklyn artists; praised the decoration on the tables; and said she had been "delighted to be asked" to co-host the evening ?a even if, inside the end, she could make about only one-sixth of it.

Then, "I'm sorry to rush off," she stated, as she headed back to Manhattan for the opening of "The Typical Heart," prior to many of the evening's guests had even arrived. Although it seemed that this relationship was not to be, the museum's leaders could hardly be faulted for having briefly harbored fantasies that it may well join a choose and envied group of New York City cultural institutions: those having a celebrity trustee.

Even though New York's arts organizations have long sought to have Hollywood actors, fashion designers and pop stars as guests at their galas, some have lately gone a step further, asking celebrities to sit on their boards alongside the bank executives, actual estate scions and wealthy socialites who traditionally occupy those positions. Last year, Ms. Parker became a trustee of the New York City Ballet, joining folks like the oil-and-gas heiress Marlene Hess along with the real estate developer Daniel Brodsky. In March, the New York Philharmonic announced that Alec Baldwin, already the voice of the orchestra's radio broadcasts, had joined its board.

Along with other arts leaders are hoping to imitate them. At a Crain's New York Company panel in March on how to build a powerful board, George Steel, the general manager and artistic director of the struggling New York City Opera, spoke enviously of the American Museum of Natural History having the "Saturday Night Live" executive producer Lorne Michaels as a trustee, and suggested that arts organizations need to try to enlist professional athletes as board members.

Behind the interest in recruiting celebrities to boards is actually a general sense that arts organizations now have to function harder than ever, both to raise funds and to obtain the attention of a public that's overwhelmed with entertainment options, numerous of them a mere touch-screen click away. Having a celebrity on the board provides several benefits, from having a prominent spokesperson to being able to lure other donors using the opportunity to rub shoulders with somebody well-known.
"There's so significantly competition to gain attention and cash right now," stated Laurie Beckelman, a consultant to many arts organizations, adding that it was leading to a healthy effort to be far more creative in searching for board members. "I think it is wonderful," she said of the growing group of celebrity arts patrons. "Many of these boards ought to be shaken up."

At the very same time, some arts managers caution that having a key celebrity as a trustee may be a double-edged sword, particularly if expectations are not spelled out and mutually agreed upon beforehand. In a lot of instances, celebrities aren't required to create the same minimum annual contribution as other trustees, leading them potentially to be much less generous. Meanwhile, simply because they've busy schedules, unless they're particularly devoted they can be infrequent presences at board meetings along with other events.
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
敛正雅7f
2011-05-14 · TA获得超过2031个赞
知道大有可为答主
回答量:1553
采纳率:0%
帮助的人:1756万
展开全部
struct A
{
void (*B)(A a);
}

我想应该是这样。
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
carter2000
2011-05-14 · TA获得超过133个赞
知道小有建树答主
回答量:64
采纳率:0%
帮助的人:125万
展开全部
指的是这种情况
#include <stdio.h>
struct A
{
void (*m_pB)(A*);
};
void B(A* a)
{
}
int main()
{
A a;
a.m_pB = B;
(*a.m_pB)(&a); // 调用B
return 0;
}
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式