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

  • Home
  • SEARCH
  • 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 8915419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:58:27+00:00 2026-06-15T04:58:27+00:00

I have following c++ code and i am getting build errors in it.I am

  • 0

I have following c++ code and i am getting build errors in it.I am unable to find out the errors please any one help.Here is the code

#include<stdlib.h>
#include <iostream.h>
using namespace std;

class PropertyPortal;
class PropertyType;
class Commercial;
class Residential;
void main()
class PropertyPortal  
{
private:

        int NoOfUsers;
        int UAN;
        char* Name;

        public:
       void setNoOfUsers(int no); 
       void setUAN(int u);      
       void setName(int n); 
       int getNoOfUsers(); 
       int getUAN(); 
       char getName();
       int getPropertyInfo(); 
       //constructors of the class
       PropertyPortal(); 
       PropertyPortal(int, int, char);
       //destructor of the class
       ~PropertyPortal ();

       void setNoOfUsers(int no)
       {
                        NoOfUsers>=1;
                        }
                        void setUAN (int u);
                        {
                        NoOfUsers>=0;
                        UAN>=1;
                        Name=Null;
                        }
                        PropertyPortal (int no, int u, char* n)
                        {
                        NoOfUsers>=no;
                        UAN=u
                        Name=VU-Real-Estate;
                        }
                        PropertyPortal (int no, int u, char* n)
                        {
                        NoOfUsers>=no; 
                        UAN=u
                        Name=n;
                        }
                        void setNoOfUsers(int no)
                        void setUAN(int u)
                        void setName(char n)
                        int getNoOfUsers()
                        int getUAN()
                        char getName()    
                        int getPropertyInfo();
class PropertyType  
{
      private:
              char* City
public:
        void setCity(char c); 
        char getCity(char c); 
        void getPropertyType();
        PropertyType();
        PropertyType(char);
        ~PropertyType();
        PropertyType();
{
        City=Null
}
        PropertyType(char* cCity)
{
        City=cCity
        }
        };          
class Commercial:PropertyType     
{
private:
        int PropertyValue
public:
       void setPropertyValue();
       int getPropertyValue();
       void getPlots();
       Commercial();
       Commercial(char);
       ~Commercial();
};

class Residential:PropertyType     
private:
        int PropertyValue;
public:
       void setPropertyValue();
       int getPropertyValue();
       int getPropertyCategory();     
};
void main ()
{
cout<<"This is just a prototype of all classes";
cout<<endl;
system("PAUSE");
}

I got error on line 2,32:2,10,103 Please help me to find out whats wrong and whats going on with the code.

Update
enter image description here

  • 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-06-15T04:58:28+00:00Added an answer on June 15, 2026 at 4:58 am

    A lot of the errors are coming from having both function declarations and definitions inside the class. Do either

    class Foo
    {
        public:
            int func();
    };
    int Foo::func() { return 5; }
    

    or

    class Foo
    {
        public:
            int func() { return 5; }
    };
    

    but not

    class Foo
    {
        public:
            int func();
            // ...
            int func() { return 5; }
    };
    

    I also see that you intend to have two constructors, one with default values, and one taking values from the creator. But then you do this:

    PropertyPortal (int no, int u, char* n)
    {
        NoOfUsers>=no;
        UAN=u
        Name=VU-Real-Estate;
    }
    PropertyPortal (int no, int u, char* n)
    {
        NoOfUsers>=no; 
        UAN=u
        Name=n;
    }
    

    I suspect you really mean

    PropertyPortal ()
    {
        NoOfUsers=1;
        UAN=1;
        Name="VU-Real-Estate";
    }
    PropertyPortal (int no, int u, char* n)
    {
        NoOfUsers=no; 
        UAN=u
        Name=strdup(n); // Remember to free() this later.
    }
    

    In fact, you’ld be even better off to scrap char*s all together, and use std::string, and maybe read about initializer lists.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please have a look at the following code #include <iostream> #include <iomanip> #include <vector>
I have the following code however am getting the error Uncaught TypeError: Object #<addThis>
I have the following code which should be getting the text from a span
I have the following code (only sections of it) for getting the entries in
I have the following code that creates the meta-description. I'm getting a 0 as
I have the following in my code, but I'm not getting an alert message,
I have following code <div id=main> <div id=one> </div> <div id=two> </div> <div id=three>
I'm trying to execute this code nmea2kml.cpp but I keep getting the following errors.
The problem I have is illustrated in the following code. #include <iostream> #define X
I have following code in initialization im = imread('Image02.tif'); figure(); imagesc(im); colormap(gray); [hImage hfig

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.