Cannot compile string types

This is a discussion on Cannot compile string types within the C++ Programming forums, part of the General Programming Boards category; Everytime I try to give a variable a string type specification error. I am using Dev C++ Compiler. I can ...

  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, 03: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, 04: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, 11:15 AM

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