Thread: getting a string from ints

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    6

    getting a string from ints

    i'm writing an othello program and at one point in the program, i need to make a string out of two ints that correspond to positions on the board. i've tried this:

    string st = "" + (char)(x+'A') + (char)(y+'1');

    when i tried to print this string out, i just got a blank line. any help would be greatly appreciated.

  2. #2
    Open to suggestions Brighteyes's Avatar
    Join Date
    Mar 2003
    Posts
    204
    This might help.
    p.s. What the alphabet would look like without q and r.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading ints specified in a string into an array
    By Curtster in forum C Programming
    Replies: 1
    Last Post: 03-15-2009, 02:19 AM
  2. can anyone see anything wrong with this code
    By occ0708 in forum C++ Programming
    Replies: 6
    Last Post: 12-07-2004, 12:47 PM
  3. Classes inheretance problem...
    By NANO in forum C++ Programming
    Replies: 12
    Last Post: 12-09-2002, 03:23 PM
  4. creating class, and linking files
    By JCK in forum C++ Programming
    Replies: 12
    Last Post: 12-08-2002, 02:45 PM
  5. convert ints to string
    By Zughiaq in forum C Programming
    Replies: 2
    Last Post: 02-25-2002, 12:37 PM