Menu

Working with the String Class

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

    Hey guys I need a little help, Well I am trying to use the string class in Dev C++ 4.9.7.0 but I can't get it to work, I have included the string.h (#include <string>) and also copied the include files in the "C:\Dev-Cpp\include\c++\mingw32\bits" in to the C:\Dev-Cpp\include\c++\bit\" driectory but it sitll don't recognise the type string, basic_string or String. Please if anyone can help I would be really greatful thanks.

    Charles

     
    • Anonymous

      Anonymous - 2003-01-28

      The type is "string" all lower case not "String".

      BTW: Copying the headers from mingw32/bits is a bad idea, and may cause problems if you upgrade - you will end up using the old files you copied rather than any updated ones in the mingw32 folder. The correct solution is to add "C:\Dev-Cpp\include\c++\mingw32\" to the default paths for projects.

       
    • upcase

      upcase - 2003-01-28

      If the problem still exists: Post your code so we can see what you did and mabe find the error, or at least copy it and try it.

       
    • Ondrej Majerech

      Ondrej Majerech - 2003-01-28

      Again - have you added using namespace std; after includes?

      Eg:
      #include <iostream>
      #include <string>
      using namespace std;
      ???

      (I'm just asking...)

       

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.