用vc++的一点疑惑

当我用

#include "stdafx.h"

#include <iostream>

using namespace std;

void main(){

...

}

的方式的时候编译不会报错。

当我用

#include "stdafx.h"

#include <iostream.h>

void main(){

...

}

也不会报错,但是却不能用system("PAUSE");这样的方法。

如果我想用这样的方法,那么必须将

using namespace std;

提前声明;

但是如果用了using namespace std;就不能用#include<iostream.h>这样的语句,而只能用#include<iostream>

否则报错.

posted @ 2008-12-17 11:39  vily_雷  阅读(123)  评论(0)    收藏  举报