国产视频最新网址|这里只有精品中文字幕情侣酒店|精品成人一区二区|91久久蜜桃网站|AV成人电影五区|欧美精品在线一区|秋霞午夜一区日韩|国产午夜成人免费看片不卡|98精品美女视频日韩一区精品视频|亚洲综合久久国产不卡日本岛国久久

參數(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)類(lè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