VC under ' Long ' followed by ' long ' is illegal

Source: Internet
Author: User

Long Long type in VC6.0 compilation error


A long long int is a 64-bit notation for GCC (GNU C).

VC inside can only use __int64


There are two ways to solve this problem:

1, only need to replace long long to __int64 can,

Note Be sure to click the Save button or the header file modification is invalid or the compilation does not pass


2, or: The following

Stdint.h file re-establish and enter the following information

/* ISO c9x 7.18 Integer Types <stdint.h> * Based on ISO/IEC SC22/WG14 9899 Committee draft (SC22 N2794) * * this Software is isn't copyrighted * * Contributor:danny Smith <[email protected]> * * This source code is offered For use with the public domain. Modify or distribute it freely. * * This code was distributed in the hope that it'll be useful but * without any WARRANTY. All warranties, EXPRESS OR implied is hereby * disclaimed. This includes, but isn't limited to warranties of * merchantability or FITNESS for A particular PURPOSE. * * date:2000-12-02 */#ifndef _stdint_h#define _stdint_h#define __need_wint_t#define __need_wchar_t#include <stddef . h>/* 7.18.1.1 exact-width integer Types */typedef signed char int8_t;typedef unsigned char uint8_t;typedef short I Nt16_t;typedef unsigned short uint16_t;typedef int int32_t;typedef unsigned uint32_t;typedef __int64 int64_t;typedef unsigned __int64 uint64_t;/* 7.18.1.2 Minimum-widtH integer types */typedef signed char int_least8_t;typedef unsigned char uint_least8_t;typedef short int_least16_t;type def unsigned short uint_least16_t;typedef int int_least32_t;typedef unsigned uint_least32_t;typedef __int64 int_least 64_t;typedef unsigned __int64 uint_least64_t;/* 7.18.1.3 fastest minimum-width integer types * not actually guarantee D to is fastest for all purposes * Here we use the Exact-width types for 8 and 16-bit INTs. */typedef Char int_fast8_t;typedef unsigned char uint_fast8_t;typedef short int_fast16_t;typedef unsigned short Uint_fas t16_t;typedef int int_fast32_t;typedef unsigned int uint_fast32_t;typedef __int64 int_fast64_t;typedef unsigned __int6 4 uint_fast64_t;/* 7.18.1.4 Integer types capable of holding object pointers */#ifndef _intptr_t_defined#define _intptr _t_defined#ifdef _win64 typedef __int64 intptr_t; #else typedef int intptr_t; #endif #endif#ifndef _uintptr_t_defined# Define _UINTPTR_T_DEFINED#IFDEF _win64 typedef unsigned __int64 uintptr_t; #else typedef unsigned int uintptr_t; #endif #endif/* 7.18.1.5 greatest-width integer types */typedef __i Nt64 intmax_t;typedef unsigned __int64 uintmax_t;/* 7.18.2 Limits of specified-width integer types */#if!defined (__CP Lusplus) | | Defined (__stdc_limit_macros)/* 7.18.2.1 Limits of exact-width integer types */#define INT8_MIN ( -128) #define INT16_MIN ( -32768) #define INT32_MIN ( -2147483647-1) #define INT64_MIN ( -9223372036854775807LL-1) #define INT8_MAX 127#define INT16 _max 32767#define int32_max 2147483647#define int64_max 9223372036854775807ll#define UINT8_MAX 0xff/* 255U */#define UIN T16_max 0xffff/* 65535U/#define UINT32_MAX 0xffffffff/* 4294967295U */#define UINT64_MAX 0xffffffffffffffffULL//184 46744073709551615ULL *//* 7.18.2.2 Limits of minimum-width integer types */#define INT_LEAST8_MIN Int8_min#define Int_lea St16_min int16_min#define int_least32_min int32_min#define int_least64_min int64_min#define INT_LEAST8_MAX INT8_MAX# Define Int_least16_MAX int16_max#define int_least32_max int32_max#define int_least64_max int64_max#define UINT_LEAST8_MAX UINT8_MAX#  Define Uint_least16_max uint16_max#define Uint_least32_max uint32_max#define uint_least64_max UINT64_MAX/* 7.18.2.3 Limits of fastest Minimum-width integer types */#define INT_FAST8_MIN int8_min#define int_fast16_min int16_min#define INT _fast32_min int32_min#define int_fast64_min int64_min#define int_fast8_max int8_max#define INT_FAST16_MAX INT16_MAX# Define Int_fast32_max int32_max#define Int_fast64_max int64_max#define uint_fast8_max uint8_max#define UINT_FAST16_ MAX uint16_max#define uint_fast32_max uint32_max#define uint_fast64_max uint64_max/* 7.18.2.4 Limits of integer types caps Able of holding object pointers */#ifdef _win64#define intptr_min int64_min#define intptr_max int64_max#define uintptr_ MAX uint64_max#else#define intptr_min int32_min#define intptr_max int32_max#define Uintptr_max UINT32_MAX#endif/* 7.18.2.5 Limits of greatest-width integer types */#define INtmax_min int64_min#define intmax_max int64_max#define uintmax_max uint64_max/* 7.18.3 Limits of other integer types */#d Efine ptrdiff_min intptr_min#define ptrdiff_max intptr_max#define sig_atomic_min INTPTR_MIN#define SIG_ATOMIC_MAX Intptr_max#define Size_max uintptr_max#ifndef wchar_min/* Also in Wchar.h * #define Wchar_min 0#define Wchar_max 0xFFFF  /* Uint16_max */#endif */* wint_t is unsigned short for compatibility with MS runtime */#define WINT_MIN 0#define Wint_max 0XFFFF/* Uint16_max */#endif//!defined (__cplusplus) | | Defined __stdc_limit_macros *//* 7.18.4 MACROS for Integer Constants */#if!defined (__cplusplus) | | Defined (__stdc_constant_macros)/* 7.18.4.1 MACROS for minimum-width integers constants accoding to Douglas Gwyn <[e Mail protected]>: "This spec is changed in ISO/IEC 9899:1999 TC1; In ISO/IEC 9899:1999 as initially published, the expansion is required to being an integer constant of precisely matching Ty PE, which is impossible to accomplish For the shorter types in most platforms, because C99 provides no standard-to-designate an integer-constant with width Less than, that's type int. TC1 changed this to require just a integer constant *expression* with *promoted* type. " */#define Int8_c (Val) ((int8_t) + (val)) #define Uint8_c (Val) ((uint8_t) + (val# #U)) #define Int16_c (Val) ((int16_t) + (val) ) #define Uint16_c (Val) ((uint16_t) + (val# #U)) #define Int32_c (val) val# #L # define Uint32_c (val) val# #UL # define Int64_c (   val) val# #LL # define Uint64_c (val) val# #ULL/* 7.18.4.2 Macros for Greatest-width Integer Constants */#define INTMAX_C (val) Int64_c (val) #define Uintmax_c (Val) Uint64_c (val) #endif/*!defined (__cplusplus) | | Defined __stdc_constant_macros */#endif


VC under ' Long ' followed by ' long ' is illegal

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.