阿 这样的有关问题也有实在的想不通阿
请高手看看阿 这样的问题也有实在的想不通阿
请看看才这几句代码就出错了
错误 1 fatal error C1083: Cannot open include file: 'iostream.h ': No such file or directory e:\zhangmeiproject\zmvc\point\point\point.cpp 1
#include <iostream.h>
struct Point
{
int x;
int y;
};
void main()
{
Point pt;
pt.x = 5;
pt.y = 5;
cout < <pt.x < <endl;
}
请问这是什么原因?要如何解决呢?
------解决方案--------------------
#include <iostream>
using namespace std;
struct Point
{
int x;
int y;
};
int main() // 不要用void 返回,标准不容许~
{
Point pt;
pt.x = 5;
pt.y = 5;
cout < <pt.x < <endl;
return 0;
}
#include <iostream>
struct Point
{
int x;
int y;
};
int main() // 不要用void 返回,标准不容许~
{
Point pt;
pt.x = 5;
pt.y = 5;
std::cout < <pt.x < <std::endl;
return 0;
}
两个试试~
请看看才这几句代码就出错了
错误 1 fatal error C1083: Cannot open include file: 'iostream.h ': No such file or directory e:\zhangmeiproject\zmvc\point\point\point.cpp 1
#include <iostream.h>
struct Point
{
int x;
int y;
};
void main()
{
Point pt;
pt.x = 5;
pt.y = 5;
cout < <pt.x < <endl;
}
请问这是什么原因?要如何解决呢?
------解决方案--------------------
#include <iostream>
using namespace std;
struct Point
{
int x;
int y;
};
int main() // 不要用void 返回,标准不容许~
{
Point pt;
pt.x = 5;
pt.y = 5;
cout < <pt.x < <endl;
return 0;
}
#include <iostream>
struct Point
{
int x;
int y;
};
int main() // 不要用void 返回,标准不容许~
{
Point pt;
pt.x = 5;
pt.y = 5;
std::cout < <pt.x < <std::endl;
return 0;
}
两个试试~