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 6650041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:50:46+00:00 2026-05-26T00:50:46+00:00

I have already searched for this type of error and found a few threads,

  • 0

I have already searched for this type of error and found a few threads, but each one recommended using #ifndef to make sure the header file is only loaded once. I have done this and still get an error. The odd thing is this error:
circle.cc:25:6: error: prototype for ‘void circle::populate_classobj(int, int, int)’ does not match any in class ‘circle’
says my function only has 3 int’s but every place i have that function, i have 4 ints.

here is my class header file

#ifndef _CIRCLE_H_
#define _CIRCLE_H_
#define PI 3.14159


class circle
{
public:
    float radius(int x1, int x2, int y1, int y2);
    float circumference(float d);
    float area(float d);
    void populate_classobj(int, int, int, int);

protected:
    float distance(int x1, int x2, int y1, int y2);


private:
    int x1, y1, x2, y2;

};

#endif // _CIRCLE_H_

Here is my function call in my class file circle.cc

void circle::populate_classobj(int cx1, int cx2, int cy1, int cy1)
{
    x1=cx1;
    x2=cx2;
    y1=cy1;
    y2=cy2;
}

and here is what i actually call in main

mycircle.populate_classobj(x1,x2,y1,y2);

there are variables called x1, x2, y1, y2 in main

The really odd thing is that the redefinition error is only for cy1, not cx1, cx2 or cy2

Thanks for any help and if you need to see more of my code, ask for it.

-Will

  • 1 1 Answer
  • 0 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-26T00:50:47+00:00Added an answer on May 26, 2026 at 12:50 am

    Last two parameters are exactly same as shown below. Hence the redefinition error.

    void circle::populate_classobj(int cx1, int cx2, int cy1, int cy1)
                                                         ^^^      ^^^
    

    I think you wanted to write:

    void circle::populate_classobj(int cx1, int cx2, int cy1, int cy2)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I guess this question that would have already been asked here. I searched but
First, yes I have searched already and found this answer already: GWT JSNI -
I have already posted a question about this, but the situation has changed sufficiently
I have already read some articles and searched on Google, but I failed to
(I'm sure this has been answered already, I searched but couldn't find it) I
I have already searched about this issue, analyzed several open source tools (like Ganymed
I have searched lot for this answer but there is no near answer for
I've already searched about this issue both on SO and other websites but I
I have already created a webpart to show the data from list, but I
I have already implemented some AJAX pagination in my Rails app by using the

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.