[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Så er den gal igen ...



Sorry to bother you once again ..
Men nu er jeg på den igen ...

Jeg har tre klasser (stadig) der arver en basisklasse ... men jeg kan ikke
få tilgang til de private variabler i basisklassen ... selvom jeg har
oprette variabler der gør dette ....
Koden ser ud som følger:

#include <string>
#include <conio.h>
#include <iostream.h>
#include <stdlib.h>
#include "dyr.h"
#ifndef _KO_H_
#define _KO_H_
using namespace std;

class CKo: public CDyr
{
private:


public:
    CKo();

};

CKo :: CKo()
{
string ny_type, string nyt_navn;
int ny_alder, int ny_vaegt, int ny_produktion;

ny_type = "n/a";
type = ny_type;

nyt_navn = "n/a";
navn = nyt_navn;

ny_alder = 0;
alder = ny_alder;

ny_vaegt = 0;
vaegt = ny_vaegt;

ny_produktion = 0;
produktion = ny_produktion;
}

#endif

Og compiler errors ser ud som følger:
[C++Error] ko.h(23): 'CDyr::type' is not accessible.
[C++Error] ko.h(25): Undefined symbol 'nyt_navn'.
[C++Warning] ko.h(36): Parameter 'navn' is never used.
(dette er bare et lille uddrag ... der er den samme error for alle variabler
..)

HVAD GØR JEG GALT????


Gitte


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *