資料結構(基於C語言)編譯問題

  • 作者:由 匿名使用者 發表于 攝影
  • 2022-03-28

資料結構(基於C語言)編譯問題 雨落心絃 1級 2008-09-26 回答

你這沒有其他函式也沒要求,我不知道你到底想要什麼答案。根據你用文字的提示,我重新給你編了一個程式,希望是你想要的。希望能幫上你的忙。

#include “stdio。h”

typedef int ElemType;

typedef struct node

{ ElemType data;

struct node *next;

}slink;

slink *crelink(int n)

{ slink *head,*p,*s; int i;

p=head=(slink *)malloc(sizeof(slink));

for(i=0;i

{ s=(slink *)malloc(sizeof(slink));

scanf(“%d”,&s->data);

p->next=s;

p=s;

}

p->next=NULL;

return head;

}

void list(slink *head)

{ slink *p;

p=head->next;

while(p)

{ printf(“%5d”,p->data);

p=p->next;

}

printf(“\n”);

}

void *convert(slink *head)

{ slink *p=head->next;

slink *n=NULL;

slink *t;

while(p)

{ t=p->next;

p->next=n;

head->next=p;

n=p;

p=t;

}

}

main()

{ slink *H;

clrscr();

H=crelink(8);

list(H);

convert(H);

list(H);

}

資料結構(基於C語言)編譯問題 一種習慣 1級 2008-10-05 回答

ads是存放備份檔案的地址

public void backredb(string ads)

{

directoryinfo dbfile = new directoryinfo(ads);

sqlconnection conn = new sqlconnection(“data source=” + sqlip + “;initial catalog=master;uid=” + sqlname + “;pwd=” + sqlpwd + “”);

conn。open();//連線資料庫

foreach (fileinfo files in dbfile。getfiles())

{

string backdbname = “”;

if (dbname == “”)

Top