#include "iostream.h"
#include "conio.h"
#include "string.h"
class team
{
public:
class student
{
public:
int record;
student *next;
char name[20];
student ( )
{
record=0;
strcpy (name,"");
}
};
student *first,*current;
void append (int num)
{
if (first==NULL)
{
cout <<"this is NULL";
first=new student;
current=first;
}
else
{
cout <<"noti's NULL";
student *temp = new student;
// current.next=temp;
}
}};
void main ( )
{
team f;
f.append(12);
//f.append(34);
getch ( );
}如果把这段程序改成链表?
程序运行的时候COUT没有被执行,说是程序另有一个出口
#include "conio.h"
#include "string.h"
class team
{
public:
class student
{
public:
int record;
student *next;
char name[20];
student ( )
{
record=0;
strcpy (name,"");
}
};
student *first,*current;
void append (int num)
{
if (first==NULL)
{
cout <<"this is NULL";
first=new student;
current=first;
}
else
{
cout <<"noti's NULL";
student *temp = new student;
// current.next=temp;
}
}};
void main ( )
{
team f;
f.append(12);
//f.append(34);
getch ( );
}如果把这段程序改成链表?
程序运行的时候COUT没有被执行,说是程序另有一个出口
解决方案 »
- 调用web service返回一堆数据,如何将其分开?
- 用户自定义报表控件
- 入门问题:如何利用ADO向ACCESS数据库写数据?
- 菜鸟提问之“我的菜单出不来”。
- 请问NET MEETING SDK是WINDOS自带的吗?
- 本人要去做移动通信网管、移动通信业务分析方面的开发,不知道有没有前途,主要需要什么技术?
- 各位走过路过的高手呀,小妹有个问题想请教
- powerbuild里面,基于多个表的query创建的数据窗口,如何实现setfilter()功能?
- 用ATL 如何写带返回值的方法?
- 怎样不用MFC和ISAPI写一个CGI的DLL ?
- 一个问题提了好几遍了,怎么就没有高手能给我彻底解决呢?
- 请大家关注!!!
{
team f;
f.append(12);
//f.append(34);
// getch ( );
}