Re: How to create a String Object in FD1?

From: Sean Estabrooks (seanlkml_at_sympatico.ca)
Date: 06/07/04

  • Next message: Aaron Gaudio: "Re: Next Fedora Release"
    Date: Mon, 7 Jun 2004 08:19:48 -0400
    To: fedora-list@redhat.com
    
    

    On Mon, 7 Jun 2004 08:44:33 +0200
    "david" <davidh@niitsa.com> wrote:

    > Hi all,
    >
    > Im trying to create a string object in C++.
    <snip>
    > Are there any packages I can install to fix this problem???

    Hi Dave,

    Please make sure to trim your posts. You sent a copy of the entire
    digest along with your message.

    The program you posted used capital letters in a few places where
    they shouldn't be used. Also, you were trying to use the string class
    without specifying the proper namespace. You can bring the
    string class (and alot of other stuff) into the global namespace by
    using the following line:

    using namespace std;

    Or just prefix std:: in front of string like so:

    #include <string>
    class test
    {
            public:
                 std::string x;
                 std::string y;
    };
    int main()
    {
            test t1;
    }

    Cheers,
    Sean

    P.S. There are other lists more appropriate for programming questions
    and there are entire lists devoted to learning c++. Check out:
    http://www.faqs.org/faqs/C-faq/learn/

    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: Aaron Gaudio: "Re: Next Fedora Release"

    Relevant Pages

    • Re: why cannot assign to function call
      ... I'm going to follow up here at the risk of annoying Mark, ... helpful in explaining things to Python beginners. ... it becomes a namespace mapping names to objects. ... to the list itself, while Steven held that Python lists ...
      (comp.lang.python)
    • Naming strategy
      ... I am looking at the naming strategy for a new forest. ... The usual reason for using a private namespace like ad.myco.local is that it ... won't be released to public dns servers. ... to maintain two lists if you use a different namespace. ...
      (microsoft.public.windows.server.active_directory)
    • Domain naming strategies
      ... Its a well worn question, ... The usual reason for using a private namespace like ad.myco.local is that it ... won't be released to public dns servers. ... to maintain two lists if you use a different namespace. ...
      (microsoft.public.windows.server.active_directory)
    • Re: newbie question (c++->c#)
      ... >>> I can define templates classes?... ... Lists and vectors, you can find a lot of data ... >> either System.Collections, or System.Collections.Generic namespace. ... >> As inlining is concerned, the inlining happens at the JIT level, and the ...
      (microsoft.public.dotnet.languages.csharp)
    • Namespace and Lists() (going nuts)
      ... directory and then my Lists constructor asks for a namespace. ... documentation that shows Lists is in the Microsoft.SharePoint.SoapServer ... <%@ Register Tagprefix="SharePoint" ... Compilation Error ...
      (microsoft.public.sharepoint.windowsservices)