C ++期望类型说明符

时间:2019-10-24 07:58:03

标签: c++ constructor

我试图用构造函数将类对象创建到另一个类中,但出现了“预期类型说明符”的错误。我研究示例代码,但在代码中找不到任何错误。 Cotp_connection.h

LinkedList<uint8_t> list(0,NULL);文件中有错误

LinkedList.h

#include <cstdint>
#include <vector>
using namespace std;


template  <class T> class LinkedList
{
public:
    LinkedList() {};
    LinkedList(int size, LinkedList* next) :size(size), next(next) {};
    vector <T> data;
    int size;
    LinkedList* next;


};

Cotp_connection.h

#include "connect_tcp.h"
#include "LinkedList.h"


class Cotp_connection {
public:
    LinkedList <uint8_t> list(0,NULL); // Error is here


};

0 个答案:

没有答案