conversion from 'LinkedList*' to non-scalar type 'LinkedList' requested

C++代码编译报错信息:

conversion from 'LinkedList<myInt>*' to non-scalar type 'LinkedList<myInt>' requested


有可能是因为C++ new对象的写法跟java不一样:

(1)

LinkedList<int> *test = new LinkedList<int>();

C++中只是声明对象而未new时,写法跟java一样:

(2)

LinkedList<int> test
原文地址:https://www.cnblogs.com/lvlang/p/10586407.html