Thread: Problem with creating string object

  1. #1
    Registered User
    Join Date
    Sep 2009

    Problem with creating string object

    what compilers are you using???...coz when i type in
    #include <string>
    using namespace std;
    string message;

    there are still errors....:-(

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    This thread was moved from variable type string to undo thread necromancy.

    Quote Originally Posted by welou~*
    there are still errors....
    Post the smallest and simplest program that demonstrates those errors. Post also the exact error messages that were reported.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    What errors?
    What is the full code producing errors? For example - I do not see int main()
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    My guess is the OP is using some ancient fossil like TurboC++ (which pre dates things like namespaces, the Roman Empire etc etc).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating an array with a piece of a string problem
    By steals10304 in forum C Programming
    Replies: 11
    Last Post: 08-18-2010, 10:26 PM
  2. OOP Question DB Access Wrapper Classes
    By digioz in forum C# Programming
    Replies: 2
    Last Post: 09-07-2008, 04:30 PM
  3. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 06:02 AM
  4. Replies: 4
    Last Post: 03-03-2006, 02:11 AM
  5. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM