首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > VC >

请问VC下的控制台程序

2012-04-20 
请教VC下的控制台程序#includestdafx.h classpoint{public:intxintyvoidoutput(){cout x end1

请教VC下的控制台程序
#include   "stdafx.h "
class   point
{
public:
int   x;
int   y;
void   output()
{
cout < <x < <end1 < <y < <end1;
}
}
int   _tmain(int   argc,   _TCHAR*   argv[])
{  
    point   pt;
    pt.x=5;
    pt.y=5;
    pt.output();
    return   0;
}
我学的是VC6.0
在VC.net下写这个程序
编译不通过
高手指教

[解决办法]
前边加
#include <iostream>
using namespace std;
把end1改成endl 一和L
[解决办法]
#include <iostream>
#include "stdafx.h "
===>
#include "stdafx.h "
#include <iostream>
using name space std;


[解决办法]
按ctrl+F5

热点排行