www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/23/18:24:57

Xref: news2.mv.net comp.os.msdos.djgpp:5302
From: Jarrod Haas <haasj AT infomatch DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Help! Turbo c++ compiled, but DJGPP 2.0 doesn't!
Date: Sun, 23 Jun 1996 13:03:44 -0700
Organization: None Inc.
Lines: 49
Message-ID: <31CDA320.6943@infomatch.com>
NNTP-Posting-Host: kebab.infomatch.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello,

I just finished writing the skeleton of a program in TC++ 3.0. The program
is really memory intensive, so it needs a compiler with protected mode
facilities and so forth. Since TC doesn't provide this, I attempted to
compile it under DJGPP. Not unexpectedly, there were errors.

Basically all of the errors are like this: 

  In file included from dosiface.cpp:8:
  slist.h:19: `SList' is neither function nor method; cannot be declared friend

(heres the code that generated the error)

  class LLString
  {
    protected:
      LLString* Next;
      char* Item;

    public:
      friend SList;
      LLString() {}
     ~LLString() {};
  };

Or like this:

  slist.cpp: In method `char * SList::Get_next()':
  slist.cpp:69: member `Item' is a protected member of class `LLString'
  slist.cpp:70: member `Next' is a protected member of class `LLString'


(again heres the code that generated the error)
 
  char* SList::Get_next()
  {
          char* v;
 
          v = strdup(Nodes->Item);
          Nodes = Nodes->Next;
          return v;
  }


  Everything was working fine under TC. If someone can tell me how I can
correct these problems it would be greatly appreciated.

-- Jarrod

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019