some problem about string

This is a discussion on some problem about string within the C++ Programming forums, part of the General Programming Boards category; Dear friends: I am writing a program about iteration method. i want to write a result file after each iteration, ...

  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    5

    some problem about string

    Dear friends:
    I am writing a program about iteration method.
    i want to write a result file after each iteration, and name the file with the iteration number. dat.
    how should i do to translate the integer to a string.
    Regards

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,620
    Look up the ostringstream class (within namespace std).
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Sunshine, and read this, this, and this before posting again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 8
    Last Post: 04-25-2008, 03:45 PM
  2. String issues
    By The_professor in forum C++ Programming
    Replies: 7
    Last Post: 06-12-2007, 10:11 AM
  3. 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
  4. Compile Error that i dont understand
    By bobthebullet990 in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2006, 10:19 AM
  5. Replies: 4
    Last Post: 03-03-2006, 02:11 AM

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