first I would fix your declaration of read_array/write_array since it doesn't match the actual function.
void read_array(char[], int &);
void write_array(const char[], int);
-> You forgot the []. also, I prefer to use * instead of [], but it's just semantics at that point as both do the same thing.
Thanks, works now :)) i appreciate it
was such an easy solution haha