[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: [CPROG] Re: [NOVICE] C++



In article Anders Melchiorsen <sslug@sslug> wrote:

>> Jeg anvender dog ofte "static" på variable der kun skal eksistere i
>> samme fil, så fourener de ikke andre steder ved linkning.
> Denne metode er "deprecated" og afløst af anonyme namespaces (se
> Stroustrup §B.2.3).

....
Ups, ja nu du siger det, pt. er jeg igang med C, og det er lidt
tid siden jeg i større omfang arbejde med  C++.

I C er "static" vist endnu den normale måde at gøre det på.
(min ANSI-C bog er dog fra 1988/89)

Men Stroustrups bog til C++ blev godt gennempløjet dengang , og den er 
faktisk rimelig anvendelig som opslagsbog.
Desværre slæber jeg den ikke altid med mig ;(

Men jeg skal vist have checket de nyere udgaver af Gnu C++,
da de gamle havde en del problemer sammenlignet med "bogen".

PS.
I forbindelse med kapitel 20.3.8 Comparisons (strings), er jeg faldet
over en del uoverenstemmelser i syntax til "compare()" kaldene.
Bla.: står der :

 int compare(size_type pos, site_type n, const basic_string& str) const;

Men Gnu C++  vil have det som:

 int compare(const basic_string& str, size_type pos, size_type n) const;

Noget tilsvarende for et par af de andre compare().

Hvilken er den rigtige syntax?

(jeg kan ikke komme igennem til http://www.awl.com/cp/stroustrup.3e/ 
 og se om der er fejlrettelser)

-- 
Frank Damgaard 



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