This commit is contained in:
2023-10-18 21:36:42 +08:00
parent 37f331b842
commit 15a851590b
4 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,5 @@
.vscode/**
*.exe
Test/**
!*.md

1
Test/README.md Normal file
View File

@@ -0,0 +1 @@
此文件夹用于存放测试文件

View File

@@ -3,7 +3,8 @@
int main(){
SqQuecu a_quecu; //初始化队列
SqQuecu a_quecu;
InitQuecu(&a_quecu,10,sizeof(int));//初始化队列
//出队进队测试
int *tmep;//临时存储进对的返回值
for (size_t i = 0; i < 50; i++)
@@ -31,5 +32,7 @@ int main(){
}
DestroyQueue(&a_quecu);
printf("队列已销毁\n");
InitQuecu(&a_quecu,80,sizeof(char));
return 0;
}

View File

@@ -63,7 +63,7 @@ void *enQueue(SqQuecu *Q){
if(Q->rear==Q->Maxsize-1)Q->rear=-1;
Q->rear++;
Q->size++;
return Q->container+Q->rear*Q->NodeSize;
return Q->container + Q->rear*Q->NodeSize;
}
/*