c++ - No matching function for call to classname::methodname (struct&, struct&) error -


this might silly have tried whole lot of things no avail! have cropimage method defined in cropimage.cpp , prototype in cropimage.h. method takes in struct image fields x co-ordinate, y co-ordinate, width , height. calling method in other .cpp file, somehow passing struct (or else) gives me following

errors:error: no matching function call 'cropimage::cropimage(image_cfg_struct_t&, image_cfg_struct_t&)' somename.cpp:11622:50: note: candidate in in file included somename.cpp:36:0: cropimage.h:28:9: note: void cropimage::cropimage(cropimage::image_cfg_struct_t,cropimage::image_cfg_struct_t) cropimage.h:28:9: note:   no known conversion argument 1 'image_cfg_struct_t' 'cropimage::image_cfg_struct_t' 

here mcve: in cropimage.h :

class cropimage {  public:     struct image_cfg_struct_t {         unsigned int image_x;         unsigned int image_y ;         unsigned int image_width ;         unsigned int image_height;     };      void cropimage(image_cfg_struct_t input_image, image_cfg_struct_t crop_image); }; 

in cropimage.cpp :

void cropimage :: cropimage(image_cfg_struct_t input_image,image_cfg_struct_t crop_image) { } 

and in calling .cpp file:

#include "cropimage.h" cropimage          cropimage_obj; image_cfg_struct_t  input_image = {0,0,4096,2160}; image_cfg_struct_t  crop_image  = {1288,802,700,700}; cropimage_obj.cropimage(input_image,crop_image); 


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -