Недоступный объект при компиляции кодаC++

Программы на C++. Форум разработчиков
Ответить Пред. темаСлед. тема
Anonymous
 Недоступный объект при компиляции кода

Сообщение Anonymous »

Я хочу скомпилировать исходный код Rigi, но при компиляции возникает ошибка:

Код: Выделить всё

adt/object.h: At global scope:
adt/object.h:35:18: error: ‘class RigiObject RigiObject::RigiObject’ is inaccessible
adt/chararray.h:51:13: error: within this context
make: *** [cl_arcflags.o] Error 1
Вот наши два файла.
object.h:

Код: Выделить всё

#ifndef OBJECTH
#define OBJECTH 1

#include 
#ifndef STREAM_H
#include 
#endif
#ifndef __STRING_H
#include 
#endif
#ifndef __STDLIB_H
#include 
#endif
#ifndef _CCHEADER_H_
#include "CCheader.h"
#endif

extern char* indent_line(int);

class RigiObject;
typedef RigiObject* ObjectPtr;

#define Oberr(a) fprintf(stderr,"ERROR :: Generic Object Routine Called :: %s\n","a");

class RigiObject {
public:
RigiObject() {/*Oberr(RigiObject)*/;}
~RigiObject() {/*Oberr(~RigiObject)*/;}

// Routines that are really described by the Derived Classes
virtual int Printout(int)  const
{Oberr(printout); return (int) 0;}
virtual unsigned int Hash() const
{Oberr(hash); return (unsigned int) 0; }
virtual RigiBool isEqual(void* a) const
{Oberr(isEqual); a = NIL;
(void) abort();
return (RigiBool) RigiFalse;}
virtual void Delete_class(ObjectPtr)
{Oberr(delete_type);}
virtual void* Create_class();
virtual void* Duplicate_class();

};

#endif
и chararray.h:

Код: Выделить всё

#ifndef CHARARRAYH
#define CHARARRAYH

#ifndef ARRAYOBIDH
#include "array.h"
#endif
#ifndef CHARTYPEH
#include "chartype.h"
#endif

class CharArray;
typedef CharArray* CharArrayPtr;

class CharArray : public Array {
int slot;
public:
// Routines to initialize and destroy the class.
CharArray(unsigned int size = CLTN_DEFAULT_CAPACITY);
CharArray(const CharArray&);
~CharArray();

// Functions that are Required to Use this Class as an Object

// .... all routines the same as in Class Array.......

// Routines that are required by a Collection class and derived classes
// of Collections. [See Array Class for these routines.]

virtual unsigned int size() const {return slot;}

// .... all routines the same as in Class Array.......

// Routines specific to this class
void operator=(const CharArray&);
RigiBool operator==(const CharArray&) const;
void Create(char*);
void Create(char*,int);
void Create(int, char*);
void Add(char*);
void Add(CharType&);
void Addob(RigiObject& ob)
{Array::Add(slot++,&ob);}
void Append(char*);
char* Concat(char);
int FindIndex(char*);
char* Remove()
{return ((CharTypePtr)Array::Remove(--slot))->string();}
ObjectPtr Pop()
{return (Array::Remove(--slot));}
ObjectPtr Look(int i)
{return (Array::At(i));}
void Empty();
virtual unsigned int Size() const
{return slot;}
char* Peek();
char* At(int);
};

#endif
Что не так с кодом?

Подробнее здесь: https://stackoverflow.com/questions/108 ... iling-code
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «C++»