bigmonkey - 2007-1-27 18:10:00
#include<iostream>
using namespace std;
int main()
{
double Name;
double Address;
cout<<"Enter your Name:";
cin>>Name;
cout<<endl;
cout<<"Enter your Address:";
cin>>Address;
cout<<endl;
return 0;
}
出错就是。。。我输入不了地址名啊。。为什么呢?
附件:
8278282007127180144.jpg
bigmonkey - 2007-1-27 18:39:00
问题解决了。。。
#include<iostream>
#include<string>
using namespace std;
int main()
{
string Name;
string Address;
cout<<"Enter your Name:";
cin>>Name;
cout<<endl;
cout<<"Enter your Address:";
cin>>Address;
cout<<endl;
return 0;
}
菜青虫虫 - 2007-1-28 10:37:00
你定义的类型是double,输入一个string,怎么可能……
Calmer - 2007-1-28 15:26:00
为什么不直接写#include<Iostream.h>呢??
闪电风暴 - 2007-1-29 13:36:00
感觉用char[]比较好
石三伢子 - 2007-2-4 3:44:00
我喜欢,虽看不懂!
是不是常量 定义的越清楚!程序就越短啊??
石三伢子 - 2007-2-5 0:44:00
我用Borland C++3.1编译器 编译1楼哥哥的程序提示Address 无效代码,请问是怎么回事?
© 2000 - 2026 Rising Corp. Ltd.