Undefined

This is a discussion on Undefined within the C Programming forums, part of the General Programming Boards category; when i try to declare word or byte variable in turbo c i get undefined messages someone can plz help ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    30

    Undefined

    when i try to declare word or byte variable in turbo c i get undefined messages someone can plz help me?

  2. #2
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    There's is no standard word or byte variable at least not until C99.






    There's unsigned char which has CHAR_BIT bits and sizeof() 1 and int






    which happens to be 2 bytes in DOS/turbo c.













    My guess is there's something like






    typedef unsigned char BYTE and






    typedef unsigned int WORD in stdlib.h

  3. #3
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    This is what you want:
    typedef unsigned char byte;
    typedef unsigned short word;

    In addition you could do this:
    typedef unsigned long dword;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 12:45 PM
  2. C OpenGL Compiler Error?
    By Matt3000 in forum C Programming
    Replies: 12
    Last Post: 07-07-2006, 05:42 PM
  3. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  4. Problem with OpenGL tutorial
    By 2Biaz in forum Windows Programming
    Replies: 18
    Last Post: 09-16-2004, 12:02 PM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 10:51 AM

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