C99标准里的inttypes.h头文件

C 语言_系统函数_inttypes.h深度解析 阅读详情
AI摘要

本文解析了C99标准中PRIu32宏定义的意义及其使用场景,介绍了不同类型的宏定义,并提供了Ubuntu系统下inttypes.h文件的具体内容。

来源

在查看代码时看到如下类型:

fprintf(stderr,
        "\033[%"PRIu32";3%"PRIu32"m%s\033[0m",
        (color[level] >> 4) & 15,
         color[level] & 15,
         str);

其中的PRIu32是什么意思?上网搜了一下才知道是C99标准里新引入的宏定义,如下:

# define PRIu32     "u"

这些宏定义里,PRIi8、PRIu8、PRIo8以及PRIx8,其中i为有符号,u为无符号,o为8进制以及x为16进制。

inttypes.h源码

Ubuntu系统的代码路径位于/usr/include/inttypes.h下,附录如下:

/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <http://www.gnu.org/licenses/>.  */

/*
 *  ISO C99: 7.8 Format conversion of integer types <inttypes.h>
 */

#ifndef _INTTYPES_H
#define _INTTYPES_H 1

#include <features.h>
/* Get the type definitions.  */
#include <stdint.h>

/* Get a definition for wchar_t.  But we must not define wchar_t itself.  */
#ifndef ____gwchar_t_defined
# ifdef __cplusplus
#  define __gwchar_t wchar_t
# elif defined __WCHAR_TYPE__
typedef __WCHAR_TYPE__ __gwchar_t;
# else
#  define __need_wchar_t
#  include <stddef.h>
typedef wchar_t __gwchar_t;
# endif
# define ____gwchar_t_defined   1
#endif

# if __WORDSIZE == 64
#  define __PRI64_PREFIX    "l"
#  define __PRIPTR_PREFIX   "l"
# else
#  define __PRI64_PREFIX    "ll"
#  define __PRIPTR_PREFIX
# endif

/* Macros for printing format specifiers.  */

/* Decimal notation.  */
# define PRId8      "d"
# define PRId16     "d"
# define PRId32     "d"
# define PRId64     __PRI64_PREFIX "d"

# define PRIdLEAST8 "d"
# define PRIdLEAST16    "d"
# define PRIdLEAST32    "d"
# define PRIdLEAST64    __PRI64_PREFIX "d"

# define PRIdFAST8  "d"
# define PRIdFAST16 __PRIPTR_PREFIX "d"
# define PRIdFAST32 __PRIPTR_PREFIX "d"
# define PRIdFAST64 __PRI64_PREFIX "d"


# define PRIi8      "i"
# define PRIi16     "i"
# define PRIi32     "i"
# define PRIi64     __PRI64_PREFIX "i"

# define PRIiLEAST8 "i"
# define PRIiLEAST16    "i"
# define PRIiLEAST32    "i"
# define PRIiLEAST64    __PRI64_PREFIX "i"

# define PRIiFAST8  "i"
# define PRIiFAST16 __PRIPTR_PREFIX "i"
# define PRIiFAST32 __PRIPTR_PREFIX "i"
# define PRIiFAST64 __PRI64_PREFIX "i"

/* Octal notation.  */
# define PRIo8      "o"
# define PRIo16     "o"
# define PRIo32     "o"
# define PRIo64     __PRI64_PREFIX "o"

# define PRIoLEAST8 "o"
# define PRIoLEAST16    "o"
# define PRIoLEAST32    "o"
# define PRIoLEAST64    __PRI64_PREFIX "o"

# define PRIoFAST8  "o"
# define PRIoFAST16 __PRIPTR_PREFIX "o"
# define PRIoFAST32 __PRIPTR_PREFIX "o"
# define PRIoFAST64 __PRI64_PREFIX "o"

/* Unsigned integers.  */
# define PRIu8      "u"
# define PRIu16     "u"
# define PRIu32     "u"
# define PRIu64     __PRI64_PREFIX "u"

# define PRIuLEAST8 "u"
# define PRIuLEAST16    "u"
# define PRIuLEAST32    "u"
# define PRIuLEAST64    __PRI64_PREFIX "u"

# define PRIuFAST8  "u"
# define PRIuFAST16 __PRIPTR_PREFIX "u"
# define PRIuFAST32 __PRIPTR_PREFIX "u"
# define PRIuFAST64 __PRI64_PREFIX "u"

/* lowercase hexadecimal notation.  */
# define PRIx8      "x"
# define PRIx16     "x"
# define PRIx32     "x"
# define PRIx64     __PRI64_PREFIX "x"

# define PRIxLEAST8 "x"
# define PRIxLEAST16    "x"
# define PRIxLEAST32    "x"
# define PRIxLEAST64    __PRI64_PREFIX "x"

# define PRIxFAST8  "x"
# define PRIxFAST16 __PRIPTR_PREFIX "x"
# define PRIxFAST32 __PRIPTR_PREFIX "x"
# define PRIxFAST64 __PRI64_PREFIX "x"

/* UPPERCASE hexadecimal notation.  */
# define PRIX8      "X"
# define PRIX16     "X"
# define PRIX32     "X"
# define PRIX64     __PRI64_PREFIX "X"

# define PRIXLEAST8 "X"
# define PRIXLEAST16    "X"
# define PRIXLEAST32    "X"
# define PRIXLEAST64    __PRI64_PREFIX "X"

# define PRIXFAST8  "X"
# define PRIXFAST16 __PRIPTR_PREFIX "X"
# define PRIXFAST32 __PRIPTR_PREFIX "X"
# define PRIXFAST64 __PRI64_PREFIX "X"


/* Macros for printing `intmax_t' and `uintmax_t'.  */
# define PRIdMAX    __PRI64_PREFIX "d"
# define PRIiMAX    __PRI64_PREFIX "i"
# define PRIoMAX    __PRI64_PREFIX "o"
# define PRIuMAX    __PRI64_PREFIX "u"
# define PRIxMAX    __PRI64_PREFIX "x"
# define PRIXMAX    __PRI64_PREFIX "X"


/* Macros for printing `intptr_t' and `uintptr_t'.  */
# define PRIdPTR    __PRIPTR_PREFIX "d"
# define PRIiPTR    __PRIPTR_PREFIX "i"
# define PRIoPTR    __PRIPTR_PREFIX "o"
# define PRIuPTR    __PRIPTR_PREFIX "u"
# define PRIxPTR    __PRIPTR_PREFIX "x"
# define PRIXPTR    __PRIPTR_PREFIX "X"


/* Macros for scanning format specifiers.  */

/* Signed decimal notation.  */
# define SCNd8      "hhd"
# define SCNd16     "hd"
# define SCNd32     "d"
# define SCNd64     __PRI64_PREFIX "d"

# define SCNdLEAST8 "hhd"
# define SCNdLEAST16    "hd"
# define SCNdLEAST32    "d"
# define SCNdLEAST64    __PRI64_PREFIX "d"

# define SCNdFAST8  "hhd"
# define SCNdFAST16 __PRIPTR_PREFIX "d"
# define SCNdFAST32 __PRIPTR_PREFIX "d"
# define SCNdFAST64 __PRI64_PREFIX "d"

/* Signed decimal notation.  */
# define SCNi8      "hhi"
# define SCNi16     "hi"
# define SCNi32     "i"
# define SCNi64     __PRI64_PREFIX "i"

# define SCNiLEAST8 "hhi"
# define SCNiLEAST16    "hi"
# define SCNiLEAST32    "i"
# define SCNiLEAST64    __PRI64_PREFIX "i"

# define SCNiFAST8  "hhi"
# define SCNiFAST16 __PRIPTR_PREFIX "i"
# define SCNiFAST32 __PRIPTR_PREFIX "i"
# define SCNiFAST64 __PRI64_PREFIX "i"

/* Unsigned decimal notation.  */
# define SCNu8      "hhu"
# define SCNu16     "hu"
# define SCNu32     "u"
# define SCNu64     __PRI64_PREFIX "u"

# define SCNuLEAST8 "hhu"
# define SCNuLEAST16    "hu"
# define SCNuLEAST32    "u"
# define SCNuLEAST64    __PRI64_PREFIX "u"

# define SCNuFAST8  "hhu"
# define SCNuFAST16 __PRIPTR_PREFIX "u"
# define SCNuFAST32 __PRIPTR_PREFIX "u"
# define SCNuFAST64 __PRI64_PREFIX "u"

/* Octal notation.  */
# define SCNo8      "hho"
# define SCNo16     "ho"
# define SCNo32     "o"
# define SCNo64     __PRI64_PREFIX "o"

# define SCNoLEAST8 "hho"
# define SCNoLEAST16    "ho"
# define SCNoLEAST32    "o"
# define SCNoLEAST64    __PRI64_PREFIX "o"

# define SCNoFAST8  "hho"
# define SCNoFAST16 __PRIPTR_PREFIX "o"
# define SCNoFAST32 __PRIPTR_PREFIX "o"
# define SCNoFAST64 __PRI64_PREFIX "o"

/* Hexadecimal notation.  */
# define SCNx8      "hhx"
# define SCNx16     "hx"
# define SCNx32     "x"
# define SCNx64     __PRI64_PREFIX "x"

# define SCNxLEAST8 "hhx"
# define SCNxLEAST16    "hx"
# define SCNxLEAST32    "x"
# define SCNxLEAST64    __PRI64_PREFIX "x"

# define SCNxFAST8  "hhx"
# define SCNxFAST16 __PRIPTR_PREFIX "x"
# define SCNxFAST32 __PRIPTR_PREFIX "x"
# define SCNxFAST64 __PRI64_PREFIX "x"


/* Macros for scanning `intmax_t' and `uintmax_t'.  */
# define SCNdMAX    __PRI64_PREFIX "d"
# define SCNiMAX    __PRI64_PREFIX "i"
# define SCNoMAX    __PRI64_PREFIX "o"
# define SCNuMAX    __PRI64_PREFIX "u"
# define SCNxMAX    __PRI64_PREFIX "x"

/* Macros for scaning `intptr_t' and `uintptr_t'.  */
# define SCNdPTR    __PRIPTR_PREFIX "d"
# define SCNiPTR    __PRIPTR_PREFIX "i"
# define SCNoPTR    __PRIPTR_PREFIX "o"
# define SCNuPTR    __PRIPTR_PREFIX "u"
# define SCNxPTR    __PRIPTR_PREFIX "x"


__BEGIN_DECLS

#if __WORDSIZE == 64

/* We have to define the `uintmax_t' type using `ldiv_t'.  */
typedef struct
  {
    long int quot;      /* Quotient.  */
    long int rem;       /* Remainder.  */
  } imaxdiv_t;

#else

/* We have to define the `uintmax_t' type using `lldiv_t'.  */
typedef struct
  {
    __extension__ long long int quot;   /* Quotient.  */
    __extension__ long long int rem;    /* Remainder.  */
  } imaxdiv_t;

#endif


/* Compute absolute value of N.  */
extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__));

/* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */
extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
      __THROW __attribute__ ((__const__));

/* Like `strtol' but convert to `intmax_t'.  */
extern intmax_t strtoimax (const char *__restrict __nptr,
               char **__restrict __endptr, int __base) __THROW;

/* Like `strtoul' but convert to `uintmax_t'.  */
extern uintmax_t strtoumax (const char *__restrict __nptr,
                char ** __restrict __endptr, int __base) __THROW;

/* Like `wcstol' but convert to `intmax_t'.  */
extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
               __gwchar_t **__restrict __endptr, int __base)
     __THROW;

/* Like `wcstoul' but convert to `uintmax_t'.  */
extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
                __gwchar_t ** __restrict __endptr, int __base)
     __THROW;

#ifdef __USE_EXTERN_INLINES

# if __WORDSIZE == 64

extern long int __strtol_internal (const char *__restrict __nptr,
                   char **__restrict __endptr,
                   int __base, int __group)
  __THROW __nonnull ((1)) __wur;
/* Like `strtol' but convert to `intmax_t'.  */
__extern_inline intmax_t
__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,
          int base))
{
  return __strtol_internal (nptr, endptr, base, 0);
}

extern unsigned long int __strtoul_internal (const char *__restrict __nptr,
                         char ** __restrict __endptr,
                         int __base, int __group)
  __THROW __nonnull ((1)) __wur;
/* Like `strtoul' but convert to `uintmax_t'.  */
__extern_inline uintmax_t
__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,
          int base))
{
  return __strtoul_internal (nptr, endptr, base, 0);
}

extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
                   __gwchar_t **__restrict __endptr,
                   int __base, int __group)
  __THROW __nonnull ((1)) __wur;
/* Like `wcstol' but convert to `intmax_t'.  */
__extern_inline intmax_t
__NTH (wcstoimax (const __gwchar_t *__restrict nptr,
          __gwchar_t **__restrict endptr, int base))
{
  return __wcstol_internal (nptr, endptr, base, 0);
}

extern unsigned long int __wcstoul_internal (const __gwchar_t *
                         __restrict __nptr,
                         __gwchar_t **
                         __restrict __endptr,
                         int __base, int __group)
  __THROW __nonnull ((1)) __wur;
/* Like `wcstoul' but convert to `uintmax_t'.  */
__extern_inline uintmax_t
__NTH (wcstoumax (const __gwchar_t *__restrict nptr,
          __gwchar_t **__restrict endptr, int base))
{
  return __wcstoul_internal (nptr, endptr, base, 0);
}

# else /* __WORDSIZE == 32 */

__extension__
extern long long int __strtoll_internal (const char *__restrict __nptr,
                     char **__restrict __endptr,
                     int __base, int __group)
  __THROW __nonnull ((1)) __wur;
/* Like `strtol' but convert to `intmax_t'.  */
__extern_inline intmax_t
__NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr,
          int base))
{
  return __strtoll_internal (nptr, endptr, base, 0);
}

__extension__
extern unsigned long long int __strtoull_internal (const char *
                           __restrict __nptr,
                           char **
                           __restrict __endptr,
                           int __base,
                           int __group)
  __THROW __nonnull ((1)) __wur;
/* Like `strtoul' but convert to `uintmax_t'.  */
__extern_inline uintmax_t
__NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr,
          int base))
{
  return __strtoull_internal (nptr, endptr, base, 0);
}

__extension__
extern long long int __wcstoll_internal (const __gwchar_t *__restrict __nptr,
                     __gwchar_t **__restrict __endptr,
                     int __base, int __group)
  __THROW __nonnull ((1)) __wur;
/* Like `wcstol' but convert to `intmax_t'.  */
__extern_inline intmax_t
__NTH (wcstoimax (const __gwchar_t *__restrict nptr,
          __gwchar_t **__restrict endptr, int base))
{
  return __wcstoll_internal (nptr, endptr, base, 0);
}


__extension__
extern unsigned long long int __wcstoull_internal (const __gwchar_t *
                           __restrict __nptr,
                           __gwchar_t **
                           __restrict __endptr,
                           int __base,
                           int __group)
  __THROW __nonnull ((1)) __wur;
/* Like `wcstoul' but convert to `uintmax_t'.  */
__extern_inline uintmax_t
__NTH (wcstoumax (const __gwchar_t *__restrict nptr,
          __gwchar_t **__restrict endptr, int base))
{
  return __wcstoull_internal (nptr, endptr, base, 0);
}

# endif /* __WORDSIZE == 32 */
#endif  /* Use extern inlines.  */

__END_DECLS

#endif /* inttypes.h */
stdint.h和inttypes.h文件分享 stdint.h源码 /* A portable stdint.h **************************************************************************** * BSD License: **************************************************************************** * * Copyright (c) 2005-2016 Paul Hsieh * 阅读详情

相关推荐

C语言所有标准头文件汇总及功能说明

所有头文件汇总及功能说明。

超哥量化的博客 1万+

C/C++格式控制两次引号

“…size % “PRIu32”.Expected % zu.” 这个log一脸懵逼。 %zu对sizeof()的格式输出。 %zu输出size_t型。size_t在库中定义为unsigned int。 “PRIu32”在%之后肯定一种格式控制符。找出定义的地方。 用#define定义本质就是直接替换。“PRIu32” -》 ““u”” test 一个引号时无法编译过。 ...

super-H 907

C语言中stdint.h和inttypes.h头文件的使用与替代方案

在2.1.1章节中,将深入了解如何在不同平台中识别和利用固定宽度整型数据类型。在2.1.2章节中,我们将详细探讨这些类型的取值范围和内存占用情况。C语言标准库中的printf和scanf函数是进行标准I/O操作的重要手段,它们能够处理各种基本数据类型。然而,这些函数的可移植性存在局限性,因为它们依赖于具体的平台和编译器实现。为了克服这种依赖,C99引入了inttypes.h头文件,其中定义了一系列宏,以便在不同的平台之间提供一致的格式化输入输出功能。inttypes.h。

weixin_36328210的博客 1011

初入C语言,发现有趣的代码

printf("sorry,不接受¥%"PRIu32" 的硬币,请重新投币!\n", coin);printf("请收好你的零钱 ¥%" PRIu32 "\n", balance - PRICE);printf("还需投¥%" PRIu32"\n",PRICE - balance);printf("您已经投入了¥%" PRIu32 "\n", balance);puts("请投币(我们只接受1,2,5,9元三种硬币):");

Micro_Bob的博客 485

FFmpeg项目中inttypes.h和stdint.h头文件的必要性

本文还有配套的精品资源,点击获取 简介:FFmpeg是一个强大的开源多媒体处理框架,它依赖于C语言标准库中的 inttypes.h 和 stdint.h 头文件来处理各种整型数据,以保证代码在不同平台上的兼容性和一致性。这两个头文件提供了多种固定宽度的整型定义及格式化输出宏,对于音频、视频和图像数据的精确操作至关重要。本文详细介绍了这些头文件中定...

weixin_36212459的博客 1440

MSVC缺失C99头文件怎么办:msinttypes补全stdint.h与inttypes.h全指南

跨平台C/C++开发中,整数类型定义与格式化宏的差异是常见痛点。C99标准引入了stdint.h与inttypes.h,分别负责精确宽度整数类型和printf/scanf格式化宏,但早期MSVC工具链长期未完整支持,导致int64_t、PRId64等符号在Windows下不可用。msinttypes r26作为纯头文件补全方案,无需修改源码即可补齐C99整型接口,适用于旧版MSVC工程迁移或统一代码格式宏。理解类型族、格式化宏及常量宏的映射关系,配合正确的包含路径与预编译头配置,可有效规避搜索路径遮蔽、in

weixin_32306957的博客 216

C语言中的可移植类型:stdint.h和inttypes.h

    stdint.h和inttypes.h两个头文件是C99里新增加的,以确保C语言的类型在各系统中功能相同。 在stdint.h头文件中,C语言为现有类型创建了更多类型名。如:int32_t表示32位有符号整数类型。即,在32位int型系统中,int32_t相当于int型的别名;在16位int型,32位long型系统中,int32_t相当于long型的别名。这些类型别名是精确宽度整数类型。...

fzk0813 5551

msinttypes r26:旧版Visual Studio的C99标准头文件补丁

C语言跨平台开发中,固定宽度整数类型(如uint32_t、int64_t)是实现数据格式兼容的基础。C99标准定义了这些类型对应的头文件,但旧版Visual Studio(如VS2008)因历史原因未能完整支持,导致许多老工程在Windows环境编译时频繁报错。msinttypes-r26补丁包提供了一组轻量级头文件,为老旧编译器补齐了stdint.h与inttypes.h,使现有代码无需改动即可获得稳定的类型定义和格式化宏。该方案广泛应用于嵌入式、驱动及遗留系统维护场景,是解决C99标准兼容问题的经典实践

weixin_30423065的博客 278

C 标准库 <inttypes.h>

是 C99 标准引入的头文件,主要用于为固定宽度整数类型提供格式化输入输出支持。这些整数类型通常在<stdint.h>中定义,例如int8_t(8 位有符号整数)和uint64_t(64 位无符号整数)。该头文件确保代码在不同平台上的可移植性,尤其是在需要精确控制整数大小的场景中。

likuoelie的博客 845

msinttypes-r26:为旧版MSVC补齐C99缺失的stdint.h与inttypes.h

在C/C++跨平台开发中,固定宽度整数类型是保证数据布局稳定的基础。C99标准通过stdint.h与inttypes.h定义了int8_t、int64_t等类型及PRI/SCN格式宏,但旧版MSVC长期未完整实现这些头文件,导致从GCC/Clang环境移植到Windows的代码频繁报错。msinttypes-r26作为一组无需安装的兼容头文件,解压后即可为VS2013之前的工具链补齐缺失的C99类型定义与printf/scanf格式宏,尤其解决PRId64在MSVC下需展开为“I64d”的兼容问题。在维护历

weixin_28835789的博客 95

inttypes.h 和 stdint.h

在VS平台下C++调用python 时没找到inttypes.h 和 stdint.h,不知道有没有遇到相同情况的,所以分享一下

缺少inttypes.h文件的办法

C99标准定义了stdint.h、inttypes.h,用于统一的跨平台数据定义。可惜VC、BCB等编译器对C99的兼容性较差,有些版本没有该头文件。本文对此进行探讨,编写了一套兼容VC、BCB、GCC的stdint.h、inttypes.h。 先检查一下各个编译器对stdint.h、inttypes.h的支持情况—— VC6:stdint.h、inttypes.h都没有。 VC2003:stdi...

VrAloTIG的博客 1503

模仿学习算法——ATC / Diffusion Policy

最近又开始接触具身智能相关的一些工作,本文主要介绍三篇较为基础的用来做模仿学习的算法,后续有空再进一步学习分享RT系列和Pi0等文章ACT算法全称为Action Chunking with Transformers,发表于《Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware》,该论文主要内容为如何使用低成本的硬件和模仿学习算法来实的双手操作,我们主要对算法部分进行剖析ACT算法的网络结构如下图所示,使用的采用的是生成式模型VA

weixin_44580210的博客 5251

C语言拾遗——inttypes.h

  今天偶然间看到这个头文件inttypes,好奇有什么用,去找度娘玩了一波,发现这头文件挺有意思的。   这个头文件适配于C99标准,它提供整数输入的各种进制转换的宏,这是在Ubuntu上扣下来的代码(windows里我没找到放在哪)嗯~ o(* ̄▽ ̄*)o我拿VScode找到了……所以划掉   不完整的 Ubuntu: 1 //这里应该是10进制的宏 2 /* Decima...

weixin_43846396的博客 1048

SAP BAPI调用避坑指南:处理MD61/MD62计划独立需求时,这些参数和返回值你必须检查

本文详细解析了SAP BAPI调用中处理MD61/MD62计划独立需求的关键参数和返回值检查要点,包括版本控制、日期类型和删除标记等核心参数设置,以及常见错误排查和高级调试技巧,帮助开发者高效管理需求计划数据。

weixin_30316097的博客 611

群晖存储空间损毁不等于硬盘损坏:排查与修复实战

NAS存储系统中,物理硬盘、存储池与文件系统空间构成层级结构,任何一层出现异常都可能在管理界面汇总为“存储空间损毁”。事实上,异常断电、卷未正常挂载等软性问题也会触发这一红色告警,而存储池和硬盘SMART状态往往完全正常。理解这一机制后,用户无需急于格式化重建,通过事件日志审查、SSH确认挂载状态,再借助btrfs scrub等文件系统自愈工具,即可在数据不丢失的前提下恢复存储空间正常。该方案对家庭及小型办公环境中的群晖NAS尤其适用,特别是在供电不稳或硬盘休眠频繁的场景下,能有效规避误判风险。本文完整记录

weixin_30843121的博客 261

扩展整数类型stdint.h和inttypes.h

原文出自:http://blog.csdn.net/zhoudaxia/article/details/4704766

Peng_Lei_csdn的专栏 1582

01 AUTOSAR CP标准文档阅读指南

01 AUTOSAR CP标准文档阅读指南

汽车软件工程师 | 好奇博主 | 处女座 1134

C标准库源码解剖(11):扩展整数类型stdint.h和inttypes.h

C语言的基本精神是让实现选择标准类型的长度,但是这种指导思想使可移植代码难以编写。C99中引入了stdint.h和inttypes.h,对整数类型的定义和格式转换进行了规范。这种扩展整数类型的定义非常清晰,从类型名字上就可以看出它的长度,这有利于编写可移植的代码。stint.h对整数类型进行定义,inttypes.h包含了stdint.h并增加了可移植的格式控制串和转换函数。     1、std

mydear_33000的专栏 2376

【项目典型案例】-2-任意帧/特定帧CAN唤醒对ECU首帧/启动时间的影响

任意帧/特定帧CAN唤醒对ECU启动时间的影响

「汽车电子助手」的博客 1943

近五年体内微/纳米机器人赋能肿瘤精准治疗综述:以 GBM 为重点

摘要 微/纳米机器人在实体瘤治疗领域展现出突破性潜力,通过主动运动能力解决传统纳米药物递送效率低、渗透不足等核心问题。2021-2025年间形成三条技术路线:1) 磁驱、声驱等运动增强递送实现深层渗透;2) 与免疫治疗融合实现原位免疫唤醒;3) 针对胶质母细胞瘤开发跨屏障递送系统。研究重点从单一运动性能转向"运动-分布-疗效"的系统评价,需建立标准化指标评估运动学参数、肿瘤分布均匀性和安全性。未来挑战在于临床转化的可制造性、闭环操控及生物相容性优化,特别是对血脑屏障穿透等复杂场景的系统集

AllenLV的博客 5135

C/C++头文件

int isspace(int ch) 若ch是空格(’’),水平制表符(’\t’),回车符(’\r’), 走纸换行(’\f’),垂直制表符(’\v’),换行符(’\n’)返回非0值,否则返回0。int isalnum(int ch) 若ch是字母(‘A’-‘Z’,‘a’-‘z’)或数字(‘0’-‘9’) 返回非0值,否则返回0。int isxdigit(int ch)若ch是16进制数(‘0’-‘9’,‘A’-‘F’,‘a’-‘f’)返回非0值, 否则返回0。

ywh1001的博客 1166

某东详情页h5st 算法分析

某东详情页h5st 算法分析

自成背后的博客 1万+

C/C++可移植类型 stdint.h 和inttypes.h

一些类型名保证所表示的类型一定是至少有指定宽度的最小整数类型。是可容纳8位有符号整数值的类型中宽度最小的类型的一个别名。表示整数类型的宽度正好是32位。但是,某些类型名在不同系统中的功能不一样。类型更大,因为C编译器除了实现标准规定的类型以外,还可利用。被定义为系统中对8位有符号值而言运算最快的整数类型的别名。不仅提供可移植的类型名,还提供相应的输入和输出。不同的系统也可以定义相同的类型名。,以确保C语言的类型在各系统中的功能相同。类型,但可能把该类型实现为16位整数类型。表示32位的有符号整数类型。

cuiiij的博客 706

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

上一篇: C语言结构体初始化的四种方法
下一篇: C语言中的fprintf和printf区别在哪?
ericbars
博客等级 码龄10年 120粉丝 30原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值