摘要
函数是C++程序设计教学的重要部分,利用函数定义选定的形参可以是基本类型变量或对象、引用形式、指针变量或数组三种形式,因此对应函数参数传递的方法有传值法、传引用法以及传地址法。通过对函数定义和函数参数传递方法的分析,结合教学实际设计容易理解适用于理论课和上机实训课的教学过程,并做出相应的教学提示,归纳总结函数编程时参数选择的方法和教学体会。
Function is the important part of C++ program design teaching, the formal parameters selected by function definition can be the basic type of variables or objects, reference forms, pointer variables or arrays, so the methods of the function parameters transmission can be by value, by reference, and by address. Through analyzing the function definition and the method of function parameters transmission, designs the process of teaching which is easy to understand and apply to theory and computer training class and combined with teaching practice, gives the corre-sponding teaching tips of choosing the method of function parameters and summaries the teach- ing experience.
出处
《现代计算机》
2013年第1期21-23,32,共4页
Modern Computer
关键词
C++
函数
形参
C++
Functions Formal Parameter