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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:57:18+00:00 2026-06-09T21:57:18+00:00

For some reason I cannot use functions attached to the object I want to

  • 0

For some reason I cannot use functions attached to the object I want to use. I added a comment to the line that is not working. As an error I get "Error; pointer to incomplete class type is not allowed" Please help

This is code in dokter.cpp

    int counter = 0;        
    for (list<Wielrenner*>::iterator it = wielrenners.begin(); it != wielrenners.end(); it++){
        Wielrenner* wielrennerOB = *it;
        cout << "\nID: " << counter;
        cout << "List size: " << persons.size() << endl;
        
        wielrennerOB->print();  // This is not working
        counter++;
     }  

This is code in wielrenner.h

    #ifndef WIELRENNER_H_

    #define WIELRENNER_H_

    //#include <fstream>
 
    #include "persoon.h"

    #include "Onderzoek.h"

    class Wielrenner :
    public Persoon
    {
    public:
        Wielrenner(string, string, Adres, string, Datum, Datum, string, int, float, float, float,list<Onderzoek>* );
        ~Wielrenner(void);
        int     getLengte() const;
        float   getGewicht() const;
        float   getVo2max() const;
        float   getMaxVermogen() const;
        list<Onderzoek> getOnderzoekenList();

        void    setLengte(int);
        void    setGewicht(float);
        void    setVo2max(float);
        void    setMaxVermogen(float);
        void    voegOnderzoekToeList(Onderzoek);
        void    showOnderzoeksList();
        void    setOnderzoeksLijst(list<Onderzoek>&);
        void    print();
        void    printFile(ofstream&);


    private:
    int     lengte;
    float   gewicht;
    float   vo2max;
    float   maxVermogen;
    list<Onderzoek> onderzoeken;
    };

    #endif /* WIELRENNER_H_ */

code in wielrenner.cpp

    using namespace std;
    #include <string>

    #include "Wielrenner.h"
    /*
    #include "Onderzoek.h"

    */
    Wielrenner::Wielrenner(string voornaam, string achternaam, Adres adres, string telefoon, Datum datumInDienst, Datum geboorteDatum, 
                        string persoonType, int lengte, float gewicht, float vo2max, float maxVermogen,list<Onderzoek>* onderzoeken)
            : lengte(lengte), 
        gewicht(gewicht), 
        vo2max(vo2max), 
        maxVermogen(maxVermogen),
        Persoon(voornaam, achternaam, adres, telefoon, datumInDienst, geboorteDatum, persoonType)
    {
    }


    Wielrenner::~Wielrenner(void)
    {
    }

    //setten van gegevens
    void    Wielrenner::setLengte(int newLengte){
    lengte = newLengte;
    }
    void    Wielrenner::setGewicht(float newGewicht){
    gewicht = newGewicht;
    }
    void    Wielrenner::setVo2max(float newVo2max){
    vo2max = newVo2max;
    }
    void    Wielrenner::setMaxVermogen(float newMaxVermogen){
    maxVermogen = newMaxVermogen;
    }
    void    Wielrenner::voegOnderzoekToeList(Onderzoek newOnderzoek){
    onderzoeken.push_back(newOnderzoek);            
    }

    void    Wielrenner::showOnderzoeksList(){
    int teller=0;
    
    for (list<Onderzoek>::iterator it = onderzoeken.begin(); it != onderzoeken.end();     it++){
        Onderzoek onderzoekOB = *it;
        cout << teller << " - ";
        onderzoekOB.print();
        teller++;
     }  
    }

    void    Wielrenner::setOnderzoeksLijst(list<Onderzoek>& newOnderzoeksLijst){
    onderzoeken = newOnderzoeksLijst;
    }

    void    Wielrenner::print(){

    cout << "(" << persoonID << ") Persoon: " << endl;
    cout << persoonType << endl;
    cout << voornaam << " " << achternaam << endl;
    adres.print();
    cout << telefoon << endl;
    cout << "Datum in dienst: ";
    datumInDienst.print();
    cout << "Geboortedatum: ";
    geboorteDatum.print();
    cout << "> Extra wielrenner gegevens: " << endl;
    cout << "Lengte: " << lengte << endl;
    cout << "Gewicht: " << gewicht << endl;
    cout << "vo2max: " << vo2max << endl;
    cout << "maxVermogen: " << maxVermogen << endl;
    }
    void Wielrenner::printFile(ofstream &myfile){

    myfile <<  persoonID << "\n";
    myfile << persoonType << "\n";
    myfile << voornaam << " " << achternaam << "\n";
    adres.printFile(myfile);
    myfile << telefoon << "\n";
    datumInDienst.printFile(myfile);
    geboorteDatum.printFile(myfile);
    myfile << lengte << "\n";
    myfile << gewicht << "\n";
    myfile << vo2max << "\n";
    myfile << maxVermogen << "\n";
    }
    // returnen van gegevens

    int     Wielrenner::getLengte() const{
    return lengte;
    }
    float   Wielrenner::getGewicht() const{
    return gewicht;
    }
    float   Wielrenner::getVo2max() const{
    return vo2max;
    }   
    float   Wielrenner::getMaxVermogen() const{
    return maxVermogen;
    }
    list<Onderzoek> Wielrenner::getOnderzoekenList(){
    return onderzoeken;
    }
  • 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-09T21:57:19+00:00Added an answer on June 9, 2026 at 9:57 pm

    An “incomplete class” is one declared but not defined. E.g.

    class Wielrenner;
    

    as opposed to

    class Wielrenner
    {
        /* class members */
    };
    

    You need to #include "wielrenner.h" in dokter.ccp

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

Sidebar

Related Questions

I want to use http://msdn.microsoft.com/en-us/library/aa370654%28VS.85%29.aspx in my code. But for some reason I cannot
I use CSS transitions fairly regularly and for some reason I cannot get them
for some reason I get this error below when trying to use multiple require()
I have a search setup inside a div but for some reason cannot get
For some reason I cannot seem to get a ko.computed observable to compute when
It's a common problem, solved many times, but for some reason i cannot find
I declared a global shift operator but for some reason the compiler cannot deduct
For some reason or another I cannot figure out why the data when opened
For some reason the selected tab on TextMate is almost un-noticeable, I really cannot
This is kind of embarrassing but I cannot for some reason get his CSS

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.