Skip to content
Snippets Groups Projects
Commit cda5d123 authored by guoguo.yu's avatar guoguo.yu
Browse files

is_empty

parent 97029f97
No related branches found
No related tags found
1 merge request!1is_empty
#include "queue.h" #include "queue.h"
bool is_empty(queue q){
if (q.tail<0) return true;
else return false;
}
#include <stdbool.h>
#ifndef _QUEUE_H_ #ifndef _QUEUE_H_
#define _QUEUE_H_ #define _QUEUE_H_
...@@ -6,4 +7,6 @@ typedef struct _queue { ...@@ -6,4 +7,6 @@ typedef struct _queue {
int *data; int *data;
} queue; } queue;
bool is_empty(queue q);
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment