#include <iostream>
usingnamespace std;
int main ()
{
array f[]=" ";
int ans;
cout << "type 1 or two: ";
cin >> ans;
if(ans==1)
{
f[]="no";
}
if(ans==2)
{
f[]="ye";
}
cout << f;
cin.get();
cin.get();
}
Hard to explain what I'm trying to do, but basically making an array with words in it and being able to change what words are in it based on actions of the user, always get 20+ errors and I stopped trying because there has got to be something I don't know
Not clear if you're trying to use the standard container array or not.
If so, there are a few problems.
1) You're not including the header. #include <array>
2) You're not declaring the array correctly. array<T,N> where T is the type of the array and N is the size of the array.
If not, then array is not a valid type. You want something like char f[3] = " ";
Lines 12 and 16 don't make any sense.
Change f to type string and this should work the way you want.