开发者

Error while writing static function?

Error while writing static function. static int function_name ( const Reference< data_type>* ptr) { }

when i wrote a static functin which takes Reference pointer then ir gives me following error error: ISO C++ forbids declaration o开发者_JS百科f 'Reference' with no type error: expected ',' or '...' before '<' token


The compiler is complaining because it doesn't know what a Reference<T> is. Either you've forgotten to #include the header file that it is defined in, or you've forgotten to forward-declare it.


You presumably mean Reference to be a template but the compiler doesn't see it as one.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜