为什么手写的这个vector没有输出?
#include<bits/stdc++.h>
#define N 500000005
using namespace std;
template<typename T>
struct vectors
{
int vector_size=0;
T a[N]= {NULL};
bool empty()
{
return vector_size==0;
}
void push(T x)
{
a[vector_size++]=x;
}
void del(int pos)
{
for(int i=pos+1; i<=vector_size; i++) a[i-1]=a[i];
vector_size--;
}
void insert(int pos,T x)
{
for(int i=vector_size; i>=pos; i--) a[i+1]=a[i];
a[pos]=x;
vector_size++;
}
void clear()
{
memset(a,NULL,sizeof(a));
}
T front()
{
return a[0];
}
T back()
{
return a[vector_size-1];
}
};
int main()
{
vectors<int> v;
v.push(5);
cout<<v.vector_size;
}