D
Developwebsites
#include<iostream.h>
#include<iomanip.h>
#include<string>
string names[numb_names];
for(int k=1;k<=numb_names;k++) {
cout<<"\nplease enter name#"<<k<<": ";
cin>>names[k];
}
for(int k=1;k<=numb_names;k++) {
cout<<"\nname#"<<k<<"is: "<<names[k];
}
I get:
"this program has performed an illegal operation"
and the console closes.
except when 14 names are entered.
#include<iomanip.h>
#include<string>
string names[numb_names];
for(int k=1;k<=numb_names;k++) {
cout<<"\nplease enter name#"<<k<<": ";
cin>>names[k];
}
for(int k=1;k<=numb_names;k++) {
cout<<"\nname#"<<k<<"is: "<<names[k];
}
I get:
"this program has performed an illegal operation"
and the console closes.
except when 14 names are entered.