Problem with creating string object

This is a discussion on Problem with creating string object within the C++ Programming forums, part of the General Programming Boards category; what compilers are you using???...coz when i type in #include <string> using namespace std; ........ ........ ........ string message; there ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    1

    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
    Location
    Singapore
    Posts
    23,820
    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
    "I Win!" by U. Lose vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,754
    What errors?
    What is the full code producing errors? For example - I do not see int main()
    To be or not to be == true

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    33,292
    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, 01:11 AM
  5. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 09:33 PM

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