[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
 

Re: SV: [CPROG] C++ spørgsmål - hvad gårgalt med minstring?



On Sun, 22 Apr 2001, Jonas Christian Drewsen wrote:

> 
> >> Det virker nu, så jeg tror ikke jeg orker at isolere fejlen.
> >
> >Det råd jeg fik var iøvrigt korrekt, for "class": For en "struct" virkede
> >det sgu ikke!
> >
> >Jeg troede den _eneste_ forskel på struct og class var at struct medlemmer
> >pr. default var public, men der er åbenbart andre, eller hvad???
> 
> Nope, der er ikke andre. Fra "The C++ programming language" af Bjarne
> Stroustrup kap.10.2.8:

Sådan havde jeg også forstået det. Men, det kan jo bare betyde at der er
en fejl i g++ oversætteren. Ihvertfald bliver
typedef struct {
  string AsString() const;
} ged_t;

_ikke_ eksporteret fra .cc filen, mens

class Ged {
public:
  string AsString() const;  
};

bliver. Altså, linkeren fejler i det første tilfælde, men ikke i det
andet.

Med mindre navnet eller typedef gør en afgørende forskel, så må det vel
næsten være en fejl i g++, eller hvad? Eller har jeg bare stadig ikke
fattet noget?

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
Unix is here to stay. The Internet is Unix, all network administrators cut 
their teeth on Unix, and many of them say they'll give up Unix when you pry
it from their cold, dead fingers.



 
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] *