Thread: string variables? string constants?

  1. #1

    Unhappy string variables? string constants?

    how do I declare a string as for example, ABC=abcdefgh... would I put const ABC=blahblah? Help me please!!!

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Visalia, CA, USA
    Well i'm not certain that this is what you want so I'll cover all the bases.

    #include <string>
    using std::string
    const string ABC="blahblahblah";
    string EFG="abcdefghijk...";
    ABC is constant is not supposed to be changed (type casting can take away the string's constant status) and EFG can be freely altered.

  3. #3

    thank you

    thank you very much. i will try it out and see if it works.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Custom String class gives problem with another prog.
    By I BLcK I in forum C++ Programming
    Replies: 1
    Last Post: 12-18-2006, 03:40 AM
  2. Compile Error that i dont understand
    By bobthebullet990 in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2006, 09:19 AM
  3. Calculator + LinkedList
    By maro009 in forum C++ Programming
    Replies: 20
    Last Post: 05-17-2005, 12:56 PM
  4. Another overloading "<<" problem
    By alphaoide in forum C++ Programming
    Replies: 18
    Last Post: 09-30-2003, 10:32 AM
  5. "Operator must be a member function..." (Error)
    By Magos in forum C++ Programming
    Replies: 16
    Last Post: 10-28-2002, 02:54 PM