Thread: Pure C# Unsigned Short*

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    4

    Exclamation Pure C# Unsigned Short*

    Does any one know off any examples that will teach me how to convert a char* to a unsigned short* and vis versa? The code muse be pure #C code so it will complie on different platforms than microsoft windows. Also i don't want to use 'MultiByteToWideChar'.

    -Thanks, Carl.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    What is:
    >pure #C code
    ?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    The C# board is the next one down, this is C.

    -Prelude
    My best code is written with the delete key.

  4. #4
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    the C# board is the next one down, but remember when you go there: big or little endian?
    hello, internet!

  5. #5
    Registered User
    Join Date
    Jul 2002
    Posts
    4

    what about doing it in c and not c#?

    what about doing it in c and not c#?

  6. #6
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >what about doing it in c and not c#?
    Code:
    shrt = (short)strtol ( str, NULL, 10 );
    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 08-11-2008, 11:02 PM
  2. Heap corruption using zlib inflate
    By The Wazaa in forum C++ Programming
    Replies: 0
    Last Post: 03-29-2007, 12:43 PM
  3. Replies: 16
    Last Post: 10-29-2006, 05:04 AM
  4. Obtaining source & destination IP,details of ICMP Header & each of field of it ???
    By cromologic in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-29-2006, 02:49 PM