Hi Neils:
The code of the function is:
boost::tuple Speech::CheckWindowExists(std::wstring
WindowName, std::wstring WindowClass)
{
HWND TempWindow;
LPCTSTR WndClass, WndName =NULL;
if (WindowClass.length() >0 )
WndClass =WindowClass.c_str();
if (WindowName.length() >0)
WndName =WindowName.c_str();
TempWindow =FindWindow(WndClass, WndName);
if (TempWindow ==NULL)
return boost::make_tuple(false, NULL);
else
return boost::make_tuple(true, TempWindow);
}
And the errors are:
error C2440: 'initializing' : cannot convert from 'const int' to 'HWND__
*' tuple_basic.hpp 451 Speech
error C2439: 'boost::tuples::cons::head' : member could not be
initialized tuple_basic.hpp 451
Hope this helps diagnose the problem.
Cheers
Sean.
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Niels Dekker -
address until 2010-10-10
Sent: 04 July 2010 15:00
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] [boost.tuple] issue
On 2010-07-04-Sun 15:18, Sean Farrow wrote:
I've got a tuple defined as:
Boost::tuple
And when I do:
Boost::make_tuple(true, TempWindow);
I get the error
C2440 cannot convert from int to hwnd__*
Anyone got any ideas?
Visual c++ 2008, and boost 1.43.
I guess the type of your TempWindow might not be HWND...?
Otherwise maybe you should post a code snippet to clarify what you're
trying to compile!
HTH,
Niels
--
Niels Dekker
http://www.xs4all.nl/~nd/dekkerware
Scientific programmer at LKEB, Leiden University Medical Center
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users