简体   繁体   中英

Syntax not understood

What is the significant of * in this line please ?

CourseClass::CourseClass(Professor* professor){
}

It says the function argument is of pointer type.

void foo1(int bar) { }  // foo1 accepts an integer argument

void foo2(int *bar) { }  // foo2 accepts an integer pointer.

该函数将接受Profess类型的指针参数

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM