There are quite a few problems with this:
char load[5]; // you need to specify the amount of characters
char lock[5]; // same with this one
Here's the real problem:
cin>>load; // this is fine
cout<<"\n";
if (load = load) { This is wrong - it works like this:
Unfortunately, because load is an array, you can't do this. What you actually need to do use the
strcmp function to compare the two strings:
if (strcmp(load, "load") == 0)
strcmp is a function that compares two strings. It returns 0 when the two strings are equal.
The same applies to this.
Enjoy yourself.