主题:请问各位友友我这个程序为什么调试成功,执行的时候提示错误
#include <iostream>
#include <string>
using namespace std;
const int n=3;
int main()
{
cout<<"input "<<n<<" strings"<<endl;
char*str[n];
int i;
for(i=0;i<n;++i)
{cin>>str[i];}
for(i=0;i<n;++i)
{
char str1;
str1=*str[i];
cout <<str1<<endl;
}
cout<<endl;
return 0;
}
#include <string>
using namespace std;
const int n=3;
int main()
{
cout<<"input "<<n<<" strings"<<endl;
char*str[n];
int i;
for(i=0;i<n;++i)
{cin>>str[i];}
for(i=0;i<n;++i)
{
char str1;
str1=*str[i];
cout <<str1<<endl;
}
cout<<endl;
return 0;
}