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

Thread: Problem with my header

  1. #1
    Join Date
    Jan 2009

    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.

    #include <wx/wx.h>
    #include <wx/dnd.h>
    #include <vector>
    class Rectangle{
    			x = y = x2 = y2 = 0;
    		unsigned int x;
    		unsigned int y;
    		unsigned int x2;
    		unsigned int y2;
    class MyDropTarget: public wxFileDropTarget{
                virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString & filenames);
    class MyFrame : public wxFrame{
    		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{
    		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
    San Diego, CA

    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

On-Demand Webinars (sponsored)