Results 1 to 2 of 2

Thread: How to include other Libs, very newbish question !

  1. #1

    Thread Starter
    Registered User struntz's Avatar
    Join Date
    Aug 1999
    Location
    Brockway,Pa,USA
    Posts
    199

    Talking How to include other Libs, very newbish question !

    Hello everyone!!
    i have a very easy question to ask! I havn't used any other libs in such along time i fogot how to even include them....

    i always was using

    #include <iostream.h>

    then i tried to use vectors in a sorting program but i typed in

    Code:
    #include <iostream.h>
    #incldue <vector.h>
    still nothing worked....

    then i used

    #include <iostream>
    #include <vector>

    still it said File coudn't be found....

    SO what do i have to use?

    do i have to type in

    #include <iostream.h>
    #include <vector>
    using namespace::std;

    or is that how u even write it?
    i am not use to using namespace std so can someone give me an example?

    I'm currently running VC++6.0, i'm using console by the Way!!

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    You should avoid using iostream.h. Instead use
    Code:
    #include <iostream>
    #include <vector>
    #include <string>
    
    using namespace std;
    ...
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width