c++ - Error C2661, having an issue constructing with 5 parameters, SFML 2.3 -


i using sfml 2.3, visual c++. compiler error receiving "error c2661: 'tree::tree' : no overloaded function takes 4 arguments".

here tree class constructor.

 class tree : public rectangleproperties     {     public:          tree(float x, float y, sf::vector2f size, sf::vector2f origin, int rotation);         tree() {};         ~tree(); 

...

tree::tree(float x, float y, sf::vector2f size, sf::vector2f origin, int rotation) {     rect.setorigin(origin);     rect.setsize(size);     rect.setposition(x, y);     rect.setfillcolor(branches);     rect.setrotation(rotation); } 

later, , time call constructor through here:

squares.emplace_back(tree.initialpos_x, tree.initialpos_y, tree.size, tree.origin, tree.rotationvalue); 

earlier supplying 4 parameters. worked out fine, until realized implementation required 5. when ran issue having now.

things have tried:

  • cleaning , rebuilding solution
  • creating new solution, , rebuilding it.

sorry, mistake on part.

i overlooked constructor call:

squares.emplace_back(tree.initialpos_x, tree.initialpos_y, tree.size, tree.rotationvalue); 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -