我已经编写了以下代码:
STDMETHODIMP CWrapper::openPort(LONG* m_OpenPortResult)
{
std::string str;
//const char * c = str.c_str();
// Open("test".c_str())
return S_OK;
}
编译器告诉我"命名空间std中没有这样的成员“string”"。
我的头文件包含如下:
#include "stdafx.h"
#include "Wrapper.h"
#include <string.h>
using namespace std;
我到目前为止做错了什么吗?
string
和string.h
是两个不同的头文件。 - olevegard