C++程序问题,求指教错在哪

[复制链接]
查看11 | 回复2 | 2013-10-14 17:13:39 | 显示全部楼层 |阅读模式
#include "stdafx.h"#include#include#define NULL 0using namespace std;templatestruct Node//改成class试试。struct没有默认构造函数,或者你自己加个构造函数。 {DataType data;Node *next;};templateclass LinkList{public:LinkList();LinkList(DataType a[],int n);private:Node *first;};templat...
回复

使用道具 举报

千问 | 2013-10-14 17:13:39 | 显示全部楼层
templateclass LinkList{public:LinkList();LinkList(DataType a[],int n);private:Node *first;}; // 这里的 ;改为半角 ;// 两处 new Node 改为 new Nodefirst=ne...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行