Thread: ‘UInt16’ does not name a type

  1. #1
    The Programming Dutchman
    Join Date
    Jan 2008
    Posts
    55

    ‘UInt16’ does not name a type

    Hello folks,

    I have a little problem. I use SDL to create some graphics and in this library there are some properties/function who has a Uint16 return type. so to catch these values i created a function of the type Uint16. but it gives me this error:

    Code:
    ‘UInt16’ does not name a type
    is this type a general supperted type, or is it created by a typedef? of do i need to include some file?

    Thanks you helping,

    EDIT:

    Sorry guys,

    I looked into my C++ book at the list of all variable types and it turn out that: uint16 is a short term for Unsigned int (16 bits large)

    Sorry for this not needed thread.

    Jelte.
    Last edited by Jelte; 06-22-2010 at 07:43 AM.
    The Programming Dutchman

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    No, in fact, uint16 is not a standard type.
    It must be defined somewhere in a header which you are presumably including.
    Also, unsigned short is not guaranteed to be 16 bits. If you need a type of exactly 16 bits, I recommend you take a look at boost's cstdint.hpp implementation.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to pass a matrix/array from main to a function
    By Inukami in forum C Programming
    Replies: 7
    Last Post: 12-09-2009, 09:03 PM
  2. Replies: 0
    Last Post: 03-20-2008, 07:59 AM
  3. Compiler "Warnings"
    By Jeremy G in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 04-24-2005, 01:09 PM
  4. Errors
    By Rhidian in forum C Programming
    Replies: 10
    Last Post: 04-04-2005, 12:22 PM
  5. gcc problem
    By bjdea1 in forum Linux Programming
    Replies: 13
    Last Post: 04-29-2002, 06:51 PM