vc++ 6.0

来源:百度知道 编辑:UC知道 时间:2024/05/06 08:43:18
为什么vc++ 6.0中
using namespace std;
error C2871: 'std' : does not exist or is not a namespace

vc++6.0中包含头文件的命令不能省略.h?

vc++6.0的string类怎么用?

cstring又是什么?

cmath.h和math.h分别是在那种c++中用的?

通常C++教程是按照哪种c++讲的?
GCC? Borland C++? Turbo C++?
#include <string> 在vc++ 6.0中根本不行

#include "stdafx.h"
#include "iostream.h"
#include <string>
int main()
{
string a="afdsfdfgf";
cout << a << endl;
return 0;
}

Deleting intermediate files and output files for project 'eyt - Win32 Debug'.
--------------------Configuration: eyt - Win32 Debug--------------------
Compiling...
StdAfx.cpp
Compiling...
eyt.cpp
E:\Program Files\Microsoft Visual Studio\MyProjects\eyt\eyt.cpp(6) : error C2065: 'string' : undeclared identifier
E:\Program Files\Micro

vc++6.0中包含头文件的命令不能省略.h?
答:可以省略,如:#include <iostream>

vc++6.0的string类怎么用?
string类是C++标准库提供的字符串类,不是VC++提供的,使用它需要包含#include <string>

cstring又是什么?
是CString不是cstring(大小写区分),它是VC提供的字符串类,功能比上边说的string要强

cmath.h和math.h分别是在那种c++中用的?
标准C++中使用

通常C++教程是按照哪种c++讲的?
GCC? Borland C++? Turbo C++?
这些都提供C++的编译器,都支持C++的标准,不过听说GCC与C++标准最吻合

回答的辛苦,分好少啊

#include <string> 在vc++ 6.0中根本不行
乱讲,我试了行的,我的是英文企业版的VC
再说了,不行的话你可以换成#include <string.h>

按照C++最新标准,是不加.h的