I have coded the following:
STDMETHODIMP CWrapper::openPort(LONG* m_OpenPortResult)
{
std::string str;
//const char * c = str.c_str();
// Open("test".c_str())
return S_OK;
}
The compiler tells me "There is no such member "string" in the namespace std".
My includes look like this:
#include "stdafx.h"
#include "Wrapper.h"
#include <string.h>
using namespace std;
Did I do anything wrong so far?
You need to add the following:
#include <string>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With