在《The C++ Programming Language》这本书中,有这样一段话:
-----------------------------------------------------------------
The name of a structure type can be used before the type is defined as long as that use does not require the name of a member or the size of the structure to be known. for example:Class S;
S f();
void g(S);
S*h( S* );
-----------------------------------------------------------------------
问题:
1. S f() 里面的S作为函数的返回值类型不用分配空间吗?
2. Void g(S)中的S作为入参类型不用分配空间吗?
3. S*h(S*); 这句话是什么意思啊?
-----------------------------------------------------------------
The name of a structure type can be used before the type is defined as long as that use does not require the name of a member or the size of the structure to be known. for example:Class S;
S f();
void g(S);
S*h( S* );
-----------------------------------------------------------------------
问题:
1. S f() 里面的S作为函数的返回值类型不用分配空间吗?
2. Void g(S)中的S作为入参类型不用分配空间吗?
3. S*h(S*); 这句话是什么意思啊?
解决方案 »
- 请问TabCtrl如何判断选中的是那一标签页?
- 初学VC的ODBC连ACCESS遇到一点麻烦!希望大家帮忙!
- 请问如果UDP服务器要给3000个用户同时发数据,请问怎么做,请高手给点思路?
- 怎么查看我的软件是否有内存泄露?
- 有人用过msword9.olb库中对word文档的printout函数吗?
- Socket 通讯服务器(如何响应将多个客户端请求)
- 请教: MouseOver()的算法
- 50分求与Delphi语法相比较介绍异常处理的语法
- dll对话框中的按钮
- Web 页面中各元素/控件的接口的获取
- VC程序退出时“遇到问题需要关闭。我们对此引起的不便表示抱歉”
- CTreeCtrl HTREEITEM lParam值怎么进去不了呀??奇怪的是用变量进不了值,直接用"11"这种形式却有值
========================
实参完成分配了。
比如:
S stest;
g(stest);3. S*h(S*); 这句话是什么意思啊?
=================================
定义一个 函数 h, 该函数带一个参数 ,类型为 S*, 函数返回一个 S*
返回的是 S 不是 S* 撒 ...