參數(shù)傳遞問(wèn)題

時(shí)間:2020-07-21 15:00:41 筆試題目 我要投稿

參數(shù)傳遞問(wèn)題

ATest.cpp: Defines the entry point for the console application.

//參數(shù)傳遞問(wèn)題

include stdafx.h
include iostream
using namespace std;

void fun(int a,int*b,int c,int* d)

{

 a ;

 (*b) ;

 b = new int(10);

 coutaaaa bendl;//地址

 coutbbbb *bendl;//5

 c ;

 d ;

 d = new int(5);

 coutdddd dendl;//地址

 coutdddd2 *dendl;//5

}

int main(int argc, char* argv[])

{

 int a=2,b=3,c=4,d=5;

 int* p = d;

 fun(a,b,c,p);

 coutaendl;//2 值傳遞

 coutbendl;//4 指針傳遞

 coutcendl;//5 引用傳遞

 coutdendl;//5 引用傳遞 指向指針的引用

 cout*pendl;//10 引用傳遞 int(5)為整型初始化

// printf(Hello World!);

 return 0;

}

 

【參數(shù)傳遞問(wèn)題】相關(guān)文章:

JS AJAX前臺(tái)如何給后臺(tái)類的函數(shù)傳遞參數(shù)的方法09-29

橋接中路由器配置IP參數(shù)問(wèn)題08-07

剪影攝影技巧參數(shù)10-08

餐飲管理參數(shù)解讀08-20

晶體管參數(shù)有哪些-晶體管的參數(shù)11-06

常見(jiàn)的硬盤(pán)參數(shù)介紹10-08

java jar 命令行參數(shù)08-09

CAD系統(tǒng)變量及參數(shù)大全11-11

NX的參數(shù)化建模方法10-27

淺析硬盤(pán)的性能參數(shù)07-16

亚洲制服丝袜二区欧美精品,亚洲精品无码视频乱码,日韩av无码一区二区,国产人妖视频一区二区
午夜a影院在线2017 | 亚洲日本在线中文字幕dvd | 最新亚洲精品国自产在线 | 伊在人天堂亚洲香蕉精品区 | 在线观看你懂的欧美网站 | 在线天堂网最新资源视频 |