求数据结构帝!!!!!!!!!!!!!!!!!!!!!!!!!
魔兽世界吧
全部回复
仅看楼主
level 6
mobinsheng 楼主
#include<iostream>
using namespace std;
typedef ElemType int
typedef struct
{    ElemType *elem;
     int length;
     int listsize;
     int increamentsize;
} Sqlist;
void InitList_Sq(Sqlist &L)
{
     L.elem=new ElemType[100];
     L.length=0;
     L.increamentsize=10;
     L.listsize=100;
}
void p(Sqlist &L)
{
     int j;
     cout<<"shuru10geshu"<<endl;
     for(int i=0;1<10;i++)
     {
         cin>>j;
         L.length++;
         L.elem[i]=j;
     }
}
void ListInsert_Sq(Sqlist &L,ElemType e)
{
     for(int i=0;i<L.length;i++)
     {
         int k=0;
         if(L.elem[i]>e)
             k++;
     }
     for(int i=L.length;i>k;i--)
     {
         L.elem[i]=L.elem[i-1];
     }
     L.elem[k]=e;
     ++L.length;
}
void main()
{
     int m;
     Sqlist S;
     cin>>m;
     InitList_Sq(S);
     p(S);
     ListInsert_Sq(S,m);
     for(int i=0;i<S.length;i++)
         cout<<S.elem[i];
}
不能运行!!
错误时“F:\编程\C++\14\0.cpp(68) : error C2236: unexpected 'struct' '__unnamed'

求解??
在线等!!!!!
2009年09月22日 04点09分 1
level 6
mobinsheng 楼主
d
2009年09月22日 04点09分 2
level 6
mobinsheng 楼主
d
2009年09月22日 04点09分 3
level 6
mobinsheng 楼主
d
2009年09月22日 04点09分 4
level 6
mobinsheng 楼主
you ren ma?
2009年09月22日 04点09分 5
level 13
what?
2009年09月22日 04点09分 6
level 6
mobinsheng 楼主
快来啊,在线等
2009年09月22日 04点09分 7
level 6
mobinsheng 楼主
回复:6楼
你懂么????
2009年09月22日 04点09分 8
level 6
mobinsheng 楼主
wow不是万能的吗?
2009年09月22日 04点09分 9
level 6
mobinsheng 楼主
怎么没人啊?
2009年09月22日 04点09分 10
level 0
你点击那段错误报告看下错误是在哪行 上面的错误时你对struct函数没定义
2009年09月22日 04点09分 11
level 6
mobinsheng 楼主
难道悲剧????????????????????
2009年09月22日 04点09分 12
level 13
万能的
      也不能这样玩啊
2009年09月22日 04点09分 13
level 6
mobinsheng 楼主
回复:11楼
struct 是个结构体啊
2009年09月22日 04点09分 14
level 6
mobinsheng 楼主
回复:11楼
麻烦你帮我运行下,看看到底错在哪???
2009年09月22日 04点09分 15
level 6
mobinsheng 楼主
难道就这几个吗??悲剧啊!!!!
2009年09月22日 04点09分 16
level 6
mobinsheng 楼主
召唤万能帝!!!!
电脑帝!!!
C++帝!!!
数据结构帝!!!!!!!!!!!1
2009年09月22日 04点09分 17
level 6
mobinsheng 楼主

2009年09月22日 04点09分 18
level 6
mobinsheng 楼主

2009年09月22日 04点09分 19
level 6
mobinsheng 楼主

2009年09月22日 04点09分 20
1 2 3 尾页