Array

#include <stdio.h>
#include <malloc.h>
#include <stdlib.h>

typedef struct _Array{
      int *pBase;
      int length;
      int incretream;
} Array;
bool is_full(Array *pArr);
bool is_empty(Array *pArr);
void show_arr(Array *pArr);
int get();
void init_arr(Arrayy *pArr, int length);
bool insert_arr(Array *pArr, int pos, int val);
bool delete_arr(Array *pArr, int pos);
int main(int argc, const char *argv[]) {

}
bool is_empty(Array *pArr) {
      if (pArr->cnt == pArr->len) {
      return true;
    } else {
        }
}
void show_arr(Array *pArr) {
      if ( is_empty(pArr)) {
          printf("空");
    } else {

        for(int i = 0 , i < pArr->cnt, ++i) { 
            printf("%d", pArr->pBase[i]);
        }
        printf("\n");
    }

}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容