Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 962543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:31:27+00:00 2026-05-16T01:31:27+00:00

I am getting this error Expected class-name before ‘,’ token and Expected class-name before

  • 0

I am getting this error “Expected class-name before ‘,’ token” and “Expected class-name before ‘{‘ token” in MainController.h
I think I am including files as needed, also doing #ifndef HEADER_H #define HEADER_H, etc in all headers, I had no errors until I wrote MainController class.
I have no idea why this error appears. What am I missing here?

I have N4GestureRecognizer.h:

class N4GestureRecognizer;
class N4GestureRecognizerDataSource{ /*it uses N4GestureRecognizer*/ };
class N4GestureRecognizerDelegate{    };
class N4GestureRecognizer {
...    
};

N4FingerTipGestureRecognizer.h

#include "N4GestureRecognizer.h"
class N4FingerTipGestureRecognizer;

class N4FingerTipGestureRecognizerDelegate : public N4GestureRecognizerDelegate{
public:
    virtual void fingerTipGestureRecognizerCallback(N4FingerTipGestureRecognizer *recognizer) = 0;
};
class N4FingerTipGestureRecognizer : public N4GestureRecognizer{
...    
};

And MainController.h

#include "N4GestureRecognizer.h"
#include "N4FingerTipGestureRecognizer.h"

using namespace cv;

//******Error is in the next line******
class MainController : public N4GestureRecognizerDatasource, public N4FingerTipGestureRecognizeDelegate{ 
protected:
    Mat image;
public:
    /*virtual*/ Mat gestureRecognizerNeedsImageFrame(N4GestureRecognizer *recognizer);
    /*virtual*/ void fingerTipGestureRecognizerCallback(N4FingerTipGestureRecognizer *recognizer);

};
  • 1 1 Answer
  • 2 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:31:28+00:00Added an answer on May 16, 2026 at 1:31 am

    There seem to be two typos in your code:

    1. In N4GestureRecognizer.h you have N4GestureRecognizerDataSource, but you try have MainController inherit from N4GestureRecognizerDatasource; note the different case of the S in DataSource.
    2. In N4FingerTipGestureRecognizer.h you have N4FingerTipGestureRecognizerDelegate, but you try to have MainController inherit from N4FingerTipGestureRecognizeDelegate; note the missing r before Delegate.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting this error in a header file: error: expected initializer before ‘<’ token
I am getting an Expected class-name before , or ; and I dont quite
Hi I am getting the error message error: expected initializer before '<' token every
I keep on getting this error error: expected specifier-qualifier-list for core data code im
I am getting this error While running this LoadError: Expected /home/user/Desktop/Tripurari/myapp/app/models/host.rb to define Host##
I keep getting an expected identifier error at this line in my code =/
Getting Expected ',' or '{' but found '#44559' error. My code looks like this:
I'm getting this error when dealing with a number of classes including each other:
I am getting this error: ActiveRecord::AssociationTypeMismatch (Design(#2199041060) expected, got String(#2151988680)) I am trying to
Getting this error: 2009-09-03 12:44:02.307 xcodebuild[307:10b] warning: compiler 'com.apple.compilers.llvm.clang.1_0.analyzer' is based on missing compiler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.