hi!
I run the program in VS2012,there are some problems In the following procedures
for(auto e = begin(edges); e != end(edges); e++)
{
lines.push_back({{
sf::Vertex(sf::Vector2f((_e).p1.x + 2, (_e).p1.y + 2)),
sf::Vertex(sf::Vector2f((_e).p2.x + 2, (_e).p2.y + 2))
}}
);
}
error:std::vector<_Ty>::push_back No overloaded functions to accept 0 parameters
Syntax error
can this code be run under VS2012? if not ,what should i do?
Thank you for your time and forgive me for interrupting!
Looking forward to your reply!
—— cassy
Unfortunately I only have Linux on my computers. But it looks like VS2012 can't interprete the list initializer. Try using another compiler such as gcc or clang.
hi! I run the program in VS2012,there are some problems In the following procedures for(auto e = begin(edges); e != end(edges); e++) { lines.push_back({{ sf::Vertex(sf::Vector2f((_e).p1.x + 2, (_e).p1.y + 2)), sf::Vertex(sf::Vector2f((_e).p2.x + 2, (_e).p2.y + 2))
}} ); } error:std::vector<_Ty>::push_back No overloaded functions to accept 0 parameters Syntax error can this code be run under VS2012? if not ,what should i do? Thank you for your time and forgive me for interrupting! Looking forward to your reply! —— cassy