Thread: Cannot compile string types

  1. #1
    Registered User
    Join Date
    Oct 2003
    Posts
    1

    Cannot compile string types

    Everytime I try to give a variable a string type specification error. I am using Dev C++ Compiler. I can use a character array but not the string variable. The error message I receive is an unknown identifier. I have tried including the string.h library. I have been stomped trying to figure why it has a problem compiling. Please help me out!, thanks a lot

  2. #2
    Registered User major_small's Avatar
    Join Date
    May 2003
    Posts
    2,787
    i'm not sure, but try including cstring instead of string.h...
    Join is in our Unofficial Cprog IRC channel
    Server: irc.phoenixradio.org
    Channel: #Tech


    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

  3. #3
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    You need to include the string library.

    #include <string>

    using namespace std;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inheritance Hierarchy for a Package class
    By twickre in forum C++ Programming
    Replies: 7
    Last Post: 12-08-2007, 04:13 PM
  2. String Class
    By BKurosawa in forum C++ Programming
    Replies: 117
    Last Post: 08-09-2007, 01:02 AM
  3. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 05:48 PM
  4. Calculator + LinkedList
    By maro009 in forum C++ Programming
    Replies: 20
    Last Post: 05-17-2005, 12:56 PM
  5. Replies: 3
    Last Post: 03-27-2004, 12:15 PM