Letters-numbers

This is a discussion on Letters-numbers within the C++ Programming forums, part of the General Programming Boards category; When I try to input a line of text, all I get back are numbers. Is there any way to ...

  1. #1
    wuzzuppy_123
    Guest

    Letters-numbers

    When I try to input a line of text, all I get back are numbers. Is there any way to convert these?

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Can you show us how you're doing it?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    wuzzuppy_123
    Guest

    Re:

    I'm inputting it as p1n

    cin>>p1n;

    then I put in some text like "Hello"

    then when it outputs, it's all numbers like 4198952

  4. #4
    jasondoucette.com JasonD's Avatar
    Join Date
    Mar 2003
    Posts
    278
    You have to show us what type that variable is, and how you are outputting the value.

  5. #5
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Are you doing some obvious error like this:
    Code:
    char Buffer[MAXBUFFER];
    cin >> Buffer;
    cout << (int)Buffer;
    ?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Generate Random Numbers and Assign to Days of Week
    By mms in forum C++ Programming
    Replies: 10
    Last Post: 05-04-2006, 01:51 AM
  2. Replies: 4
    Last Post: 04-19-2005, 08:05 PM
  3. Line Numbers in VI and/or Visual C++ :: C++
    By kuphryn in forum C++ Programming
    Replies: 2
    Last Post: 02-10-2002, 09:54 PM
  4. Transforming letters to numbers...
    By N8760 in forum C++ Programming
    Replies: 2
    Last Post: 12-23-2001, 02:26 PM
  5. How do you allocate numbers to letters?
    By face_master in forum C++ Programming
    Replies: 9
    Last Post: 11-14-2001, 05:47 AM

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