函數(shù)指針學(xué)習(xí)1.1|C++函數(shù)指針的1個(gè)例子
(認(rèn)知有限,如有不妥,還請(qǐng)指正。)
之前學(xué)習(xí)過(guò)程中沒(méi)有太理解指針和別的東西組合的用法,記錄一下理解時(shí)用的例子。
函數(shù)指針的形式
data_types (*func_pointer)( data_types arg1, data_types arg2, ...,data_types argn);
eg1.
輸出結(jié)果為:
in default case
=reference=
[1]https://www.runoob.com/w3cnote/cpp-func-pointer.html
標(biāo)簽: