hate to ask such a newb question but...

This is a discussion on hate to ask such a newb question but... within the C++ Programming forums, part of the General Programming Boards category; God i hate STL.... (and please spare me any holier than thou sort of ramblings about how great STL is...) ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    552

    hate to ask such a newb question but...

    God i hate STL.... (and please spare me any holier than thou sort of ramblings about how great STL is...)

    whats wrong with this code?

    Code:
    #include <string>
    #include <vector>
    
    class SomeClass {
      public:
        string SomeFunct(const string &s);
        .
        .
        .
    };
    the names have been changed to protect the innocent

    i keep getting unknown identifier type errors regarding string and vector
    Last edited by *ClownPimp*; 09-13-2002 at 09:14 PM.

  2. #2
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Code:
    #include <string>
    #include <vector>
    
    class SomeClass {
      public:
        std::string SomeFunct(const std::string &s);
        .
        .
        .
    };
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    god i hate stl... and that damned newfangled std crap!!!
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

  4. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    oh yeah, and thanks
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

  5. #5
    Registered User Aran's Avatar
    Join Date
    Aug 2001
    Posts
    1,301
    um...

    Code:
    using namespace std;
    will save you the time/effort.

    there is no reason to hate stl, it merely uses the features of the language that you apparently don't yet understand/use.

  6. #6
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    well the prof said we cant use using namespace <whatnot> in a header file.
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

  7. #7
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    ... so don't use it in a header; OR get used to the STD namespace

  8. #8
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    what about "using std::string"
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. newb question
    By C_ntua in forum C++ Programming
    Replies: 3
    Last Post: 09-25-2008, 09:44 AM
  2. Newb question - Clear command line screen?
    By Fujimitsu in forum C Programming
    Replies: 3
    Last Post: 04-12-2008, 01:47 PM
  3. for ..loop newb question
    By mike71484 in forum C++ Programming
    Replies: 3
    Last Post: 02-10-2006, 10:30 PM
  4. newb question
    By Jan79 in forum C++ Programming
    Replies: 5
    Last Post: 06-18-2003, 09:59 AM
  5. Win app, newb question
    By Blender in forum Windows Programming
    Replies: 9
    Last Post: 02-04-2003, 11:17 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21