Pure C# Unsigned Short*

This is a discussion on Pure C# Unsigned Short* within the C Programming forums, part of the General Programming Boards category; Does any one know off any examples that will teach me how to convert a char* to a 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,796
    The C# board is the next one down, this is C.

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

  4. #4
    moi
    moi is offline
    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,796
    >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-12-2008, 12:02 AM
  2. Heap corruption using zlib inflate
    By The Wazaa in forum C++ Programming
    Replies: 0
    Last Post: 03-29-2007, 01: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, 03:49 PM

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