error C2440: 'Initializing' : cannot convert from 'char *' to 'std::_String_iterator<_Elem,_Traits, _Alloc>'  
Author Message
Joe Villa





PostPosted: Windows Forms General, error C2440: 'Initializing' : cannot convert from 'char *' to 'std::_String_iterator<_Elem,_Traits, _Alloc>' Top

Hi,

I cannot seem to get passed this error - I am stuck. I was using C++ Visual Studio 6.0 which my code compiled fine under. Now with Visual Studio .NET 2005 this code does not compile. My project is unmanaged code. Can someone please help me with this Thank you, Joe.

string ::iterator begin ()
{
string::iterator buf = _buffer; // THIS IS LINE OF CODE IN ERROR
return string::iterator(buf);
}


HERE IS THE DECLARATION:
// parse buffer and offsets of where we are parsing
char * _buffer;

AND MY INCLUDES ARE:

#include "stdafx.h"

#include "XmlStream.h"

#include "XmlParser.h"





Windows Forms24