函数 形参和实参
来源:互联网 发布:淘宝卖充值卡怎么弄 编辑:程序博客网 时间:2024/04/30 03:41
程序一:
#include "stdafx.h"
#include <iostream>
using namespace std;
void reset(int *ip)
{
*ip=1;
}
int _tmain(int argc, _TCHAR* argv[])
{
int i=42;
int *p=&i;
cout<<i<<endl;
cout<<*p<<endl;
cout<<p<<endl;
reset(p);
cout<<i<<endl;
cout<<*p<<endl;
cout<<p<<endl;
return 0;
}
程序二:
// c++primer.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include <iostream>
using namespace std;
void reset(int *ip)
{
ip=0;
}
int _tmain(int argc, _TCHAR* argv[])
{
int i=42;
int *p=&i;
cout<<i<<endl;
cout<<*p<<endl;
cout<<p<<endl;
reset(p);
cout<<i<<endl;
cout<<*p<<endl;
cout<<p<<endl;
return 0;
}
0 0
- 函数 形参和实参
- 函数的形参和实参
- python函数形参和实参
- 函数形参和实参问题
- 函数形参和实参特点
- 函数的形参和实参
- 形参和实参
- 形参和实参
- 形参和实参
- 形参和实参
- 形参和实参
- 形参和实参
- 形参和实参
- 形参和实参
- 实参和形参
- 形参和实参
- 实参和形参
- 形参和实参
- Lua语言学习之错误与异常
- uva1160X-Plosives并查集
- 星星
- hdu2444 The Accomodation of Students
- lightoj 1170 Counting Perfect BST
- 函数 形参和实参
- Java中的设计模式,书籍推荐
- UITableViewCell重用机制
- 外包公司框架搭建需要注意的几点
- 浮躁病
- CentOS下使用RPM安装MySQL出现file ... conflicts with file ...提示后没有反应的解决方法。
- 分糖果
- 为什么理想电流源的等效内阻是无限大
- 20140731 java 《文档在线预览功能》的实现简述