Thread: TCHAR to int

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    162

    TCHAR to int

    Hi

    I am facing quite an issue now. I need to convert TCHAR type into an int... I tried atoi() but that didnt work so well.

    Any ideas... If more specifications needed please tell me.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    According to MSDN (searching there seems like the obvious thing to do), it's _tstoi.

  3. #3
    Registered User
    Join Date
    Apr 2007
    Posts
    162
    Yes thank you works fine... Sorry that I spam with such an easy thing but I always get confused while doing type conversion. It takes everytime hours to get the correct code.

  4. #4
    Hacker MeTh0Dz's Avatar
    Join Date
    Oct 2008
    Posts
    111
    Maybe you should do a printoff of the MSDN page that covers that type of thing then. Especially if it is taking you hours to figure out which function to use.

  5. #5
    Registered User
    Join Date
    Apr 2007
    Posts
    162

    Wink

    Ok next time I will certainly do that

  6. #6
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Download MSDN, actually. Its sooooooo much easier. Particularly if you run dual monitors.

  7. #7
    Registered User
    Join Date
    Jul 2008
    Posts
    67
    In the link below are some alternative ways to do this.

    Sorry, it's in german, but I think you'll understand it ...
    http://www.c-plusplus.de/forum/viewt...-is-39488.html

    Advantages / disadvantages are described here down below in the "Fazit" ...


    Greetz
    Greenhorn
    Last edited by Greenhorn__; 10-29-2008 at 11:32 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 05-13-2007, 08:55 AM
  2. Moving Average Question
    By GCNDoug in forum C Programming
    Replies: 4
    Last Post: 04-23-2007, 11:05 PM
  3. Replies: 2
    Last Post: 03-24-2006, 08:36 PM
  4. Quack! It doesn't work! >.<
    By *Michelle* in forum C++ Programming
    Replies: 8
    Last Post: 03-02-2003, 12:26 AM
  5. easy if you know how to use functions...
    By Unregistered in forum C Programming
    Replies: 7
    Last Post: 01-31-2002, 07:34 AM