[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:
> Men Stroustrups bog til C++ blev godt gennempløjet dengang , og den er 
> faktisk rimelig anvendelig som opslagsbog.
Bjarnes bog er god til opslag -- som introduktion til programering tror 
jeg aldrig den har været ment.

> 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;
...
> Hvilken er den rigtige syntax?

template <typename charT, typename traits>
int
basic_string<charT, traits>
::compare(size_type pos, site_type n, const basic_string<charT, traits>& 
str) const;

som angivet af Bjarne 3.ed 1.printing 20.3.8 p.590 og corroberet af 
ISO/IEC 14882:1998(E) 21.3.6.8 subclause 5 p.401 burde være den rigtige.
Så *vidt* jeg husker er GNU C++s "perception" af en basic_string ikke 
sammenfaldende med STL std::string?

Hverken Bjarnes bog eller C++ standarden er dog hverken endegyldige 
og/eller fejlfrie dokumenter (men hvilke er?).

Hej fra Nils!


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