Re: string class and vc++.wank :)




John Swan a écrit :

> Thanks.
>
> Have I done something silly and not included a namespace or something?????
All standard library objects (those defined in the headers without a
..h) are in the namespace "std". Other posters have provided more
backgournd on namespaces and how to use them...

>
> In the examples that are provided in the MSDN, you do not need to that.
Unfortunately (or not, depending on your point of view), a lot of
samples are not compilable "as-is". Rather, they are made short and
concentrate on the problem/point they intend to demonstrate.

>
> I must admit - I have not done any form of coding in a few years but feel
> that managed.net is, well - non standard. Would you agree?
Your code is standard compliant, non-managed C++ and has nothing to do
with .NET. It would be the same thing with GCC or any other decently
conforming compiler.

If you've got a different behavior on another system, then your
compiler on that system is not conformant.

Concerning "standardeze level" of managed C++ or C++/CLI, it may be a
debate but the point is moot in your case, since you're writing native,
standard C++.

Arnaud
MVP - VC

.



Relevant Pages

  • Re: GCC
    ... > want to change the standard namespace. ... you are forced to deal with the std namespace. ... > Compiler writers can't sell new copies of the compiler based ... compiler is that it is THE most compliant C++ compiler out there. ...
    (Debian-User)
  • Re: GCC
    ... That spec says what the names of the standard header ... It's important if you want to the use the namespace feature. ... what use is a compiler that does ...
    (Debian-User)
  • Re: Do you put functions in the global namespace? Other than main()
    ... namespace std or namespaces within namespace std unless otherwise ... A program may add template specializations for any standard ... partial) of a standard library template results in undefined behavior ... Everything was in an identifiable compartment, ...
    (comp.lang.cpp)
  • Re: Getting Started w/ Standard C++ in Microsoft VC++ 6.0?
    ... makes programming for the Windows API *much* easier than using the API ... subsystems and rewrite the "back end" system in standard C++. ... You don't have to write "using namespace std" anywhere. ... application" (in VC6) and the standard library will be available. ...
    (microsoft.public.vc.mfc)
  • Re: Polyspace Problem
    ... language issue. ... against the standard. ... That namespace is, I think, reserved for ... compiler should, as far as I can tell, reject your code. ...
    (comp.lang.c)

Quantcast