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
C++代码编译报错信息:
conversion from 'LinkedList<myInt>*' to non-scalar type 'LinkedList<myInt>' requested(1)
LinkedList<int> *test = new LinkedList<int>();
(2)
LinkedList<int> test