Problem with my header
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Problem with my header

  1. #1
    Join Date
    Jan 2009
    Posts
    1,689

    Problem with my header

    I'm having a weird problem. My compiler is complaining that the BlobCounter method declaration has a type/value mismatch at argument 1 in template parameter list for 'template<class_tp, class_Alloc> class std::vector. What's going on? the methods are actually implemented in another file, but the problem is here.

    Code:
    #include <wx/wx.h>
    #include <wx/dnd.h>
    #include <vector>
    
    class Rectangle{
    	public:
    		Rectangle(void){
    			x = y = x2 = y2 = 0;
    		};
    		unsigned int x;
    		unsigned int y;
    		unsigned int x2;
    		unsigned int y2;
    };
    
    class MyDropTarget: public wxFileDropTarget{
          public:
                MyDropTarget(void);
                virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString & filenames);
    };
    
    class MyFrame : public wxFrame{
    	public:
    		MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
    		std::vector<Rectangle> BlobCounter(std::vector<bool> & Mot, unsigned int width, unsigned int height);
    		void RectangleBoundsFind(std::vector<bool> & Mot, std::vector<bool> & AlreadyChecked, unsigned int start, unsigned int width, unsigned int height, std::vector<Rectangle> & rect, Rectangle & current);
    };
    
    class MyApp : public wxApp{
    	public:
    		bool OnInit(){
    			frame = new MyFrame(_T("Live Test"), wxPoint(100, 100), wxSize(1024, 768));
    			frame -> Show();
    			return true;
    		};
    		MyFrame * frame;
    };

  2. #2
    Join Date
    Aug 2005
    Location
    San Diego, CA
    Posts
    1,054

    Re: Problem with my header

    I don't see any problem just looking at that. Post the definition of BlobCounter. Are you sure that you didn't get the arguments swapped accidentally in the implementation?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center