建立Win32 Cosole Application
/**
替换 #include <iostream.h>
*/
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cout << "test.";
return 0;
}
输出test。
函数调用:
/**
替换 #include <iostream.h>
*/
#include <iostream>
using namespace std;
int max(int x,int y)
{
if(x > y)
return x;
else
return y;
}
int _tmain(int argc, _TCHAR* argv[])
{
int x ,y ;
x = 1000;
y = 100;
cout << max(x,y);
cout << '\n';
char * p = new char[10];
cin >> p;
delete p;
return 0;
}
定义同义词:
typedef int INT;
typedef double DOU;
typedef int INT;
/**
替换 #include <iostream.h>
*/
#include <iostream>
using namespace std;
int max(int x,int y)
{
if(x > y)
return x;
else
return y;
}
int _tmain(int argc, _TCHAR* argv[])
{
INT x ,y ;
x = 1000;
y = 100;
cout << max(x,y);
cout << '\n';
char * p = new char[10];
cin >> p;
delete p;
return 0;
}
posted on 2008-11-02 16:00
BirdsHover 阅读(110)
评论(0) 编辑 收藏 引用 所属分类:
基础学习笔记