On Thursday 09 February 2012 23:57:46 Robert Schweikert wrote:
In an old code I have encountered the following error:
map.cpp:195:1: error: 'Map::Map' names the constructor, not the type
The code is as follows:
Map::Map& Map::operator = (Map const& map) { delete[] m_pieces; init(map);
return *this; }
I tried to remove the "::Map" but this did not help. Any ideas what should I do?
Did you try typename Map::Map ?
(in any case, we need context, or we're guessing)
Then it says
error: expected initializer before '&' token
Ilya,
What part of:
"We are guessing because there is not enough information"
is difficult to understand?
You need to post more information if you want help that leads to a solution.
As you willing to help, I have attached the whole source. The problem is in file src/map.cpp