Menu

can't find cstlib...

2003-01-27
2012-09-26
  • Nobody/Anonymous

    #include <iostream>
    #include <cstlib>

    using namespace std;

    int main(void)
    {
          cout<<"hello world!"<<endl;

          system("PAUSE");
          return 0;
    }

    18 C:\Programming\C++\Source Code\Exercises\Test Exercise.cpp:2
    cstlib: No such file or directory.

     
    • Derek Baker

      Derek Baker - 2003-01-27

      #include <iostream>
      #include <cstdlib> // d added here

      using namespace std;

      int main(void)
      {
      cout<<"hello world!"<<endl;

      system("PAUSE");
      return 0;
      }

      Derek

       
    • Nobody/Anonymous

      The file is the C standard library, or

      cstdlib

      You mis-spelled it.  C is picky about spelling and capitals and the like...

      Wayne

       
      • Anonymous

        Anonymous - 2003-01-27

        Header files are included by the pre-processor (CPP) rather that the compiler, and the parameter to #include is a filename, so technically it is the file system that is picky about spelling, and on windows it is not picky about case, but if you want to port code to Linux/Unix then you better use the correct case too!

        Sorry - that was so pedantic - I must be bored!

         
    • Nobody/Anonymous

      Well I am *so* embarassed!!!

      ;-)

      Thanks Cliff.  Was trying to make a joke, although mispelled variables can have disturbing effects too...

      Wayne (or is that Wain?)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.