[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] C++ STL helvede



On Wed, 22 May 2002, Michael Westergaard wrote:

> > In file included from /usr/include/g++-v3/bits/fpos.h:39,
> >                  from /usr/include/g++-v3/bits/std_iosfwd.h:41,
> >                  from /usr/include/g++-v3/bits/std_ios.h:39,
> >                  from /usr/include/g++-v3/bits/std_istream.h:39,
> >                  from /usr/include/g++-v3/bits/std_fstream.h:39,
> >                  from /usr/include/g++-v3/fstream:31,
> >                  from frame_generator.cpp:27:
> > /usr/include/g++-v3/i586-mandrake-linux-gnu/bits/c++io.h:60: ISO C++ 
> > forbids
> >    in-class initialization of non-const static member `_S_boolalpha'

> Du har sikkert en
> 
> class Narko {
> 	static int gnidder = 5;

> 
> Det er ikke sikkert det vil virker bagefter, det afhaenger af hvordan
> gnidder skal bruges.
> 
> Problemet er at gnidder er static (dvs. delt mellem alle objekter af
> en given klasse) men ikke const (dvs. den kan aendres i et objekt, og
> aendres i alle objekter). Det kan fx bruges til globale counters.
> 
> Det er dog meget muligt at det slet ikke er i std-biblioteket problemet
> er. Ofte knaekker man halsen paa at have lavet noget const eller ikke
> const.

Hmm. Det er en anelse problematisk for mig, at det er i STL filerne -
altså ikke det jeg har lavt.. Men, det med const er måske værd checke
ud...

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
You know you're a Linux geek when...

    When you hear the words 'Fresh meat' you think of software.
    
                                                     - segfault



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 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] *