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