Type problem when including tuple
Posted
by Person
on Stack Overflow
See other posts from Stack Overflow
or by Person
Published on 2010-04-22T03:07:40Z
Indexed on
2010/04/22
3:13 UTC
Read the original article
Hit count: 265
I'm using Visual Studio 2008 with Feature Pack 1.
I have a typedef like this typedef std::tr1::tuple<std::string, std::string, int> tileInfo
with a function like this const tileInfo& GetTile( int x, int y ) const
.
In the implementation file the function has the exact same signature (with the added class name qualifier) and I am getting a redefinition: different type modifiers
error. It seems to be looking for an int&
instead of a tileInfo&
When I mouse over the type of the function in the header, i.e. tileInfo&
it brings up a little bar saying static const int tileInfo
. I think this may be the problem, but I'm not sure what to do.
Any help is appreciated, thanks.
© Stack Overflow or respective owner