Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
std::unordered_set 迭代器遍历的复杂性
我最近玩了一个std unordered set http en cppreference com w cpp container unordered set 我怀疑我的 STL 版本会跟踪某些 FILO 数据结构 看起来像列表 中的非空存
c
C11
STL
cstandardlibrary
我可以获取标准库中定义的函数的地址吗?
考虑以下代码 include
c
languagelawyer
cstandardlibrary
C20
unspecifiedbehavior
为什么 std::setbase(2) 不切换到二进制输出?
cppreference 页面位于std setbase http en cppreference com w cpp io manip setbase says 除 8 10 或 16 之外的基值会将基域重置为零 这对应于十进制输出和依赖
c
Radix
ostream
cstandardlibrary
iomanip
为什么Windows和Linux的标准库函数名称不同?
我正在将 Windows 库移植到 Android 使用 GNU 标准 C 库选项 libstdc v3 VC 和 GNU 库之间似乎存在许多命名差异 例如 stricmp叫做strcasecmp instead unlink叫做unlin
c
cstandardlibrary
为什么 std::pow(double, int) 从 C++11 中删除?
在调查的同时计算 p q 求幂 的有效方法 其中 q 是整数 https stackoverflow com questions 5625431回顾 C 98 和 C 11 标准 我注意到显然std pow double int C 11
c
C11
cstandardlibrary
什么是 std::false_type 或 std::true_type?
我看到它的用法如下 template
c
C11
cstandardlibrary
扩展 std 命名空间被视为未定义行为的原因是什么?
为什么要添加名字std命名空间未定义的行为 显而易见的答案是 因为标准是这么说的 例如在 C 14 命名空间 std 17 6 4 2 1 1 中 如果 C 程序向命名空间添加声明或定义 则其行为是未定义的std或到一个 命名空间内的命名空
c
undefinedbehavior
cstandardlibrary
为什么标准C++库全部使用小写?
只是好奇为什么 C 标准库使用全部小写和下划线而不是camelCase or PascalCase命名约定 就我个人而言 我发现在输入代码时后者更容易处理 但是是否有某种合法的理由使用前者 主要原因 为了保持与现有代码的兼容性 因为他们也用
c
codingstyle
lowercase
cstandardlibrary
C 标准库和 C POSIX 库的区别
我对 C standard lib 和 C POSIX lib 有点困惑 因为我发现 C POSIX lib 中定义的许多头文件也是 C standard lib 的一部分 所以 我假设 C standard lib 是由ANSI C组织定
c
operatingsystem
POSIX
standardlibrary
cstandardlibrary
标准库类型的赋值运算符的 ref 限定符
我想知道 标准类型的赋值运算符没有左值引用限定是否有原因 他们都不是 因此 我们可以这样写 std string 42 std string s hello std string world oops std vector
c
STL
assignmentoperator
cstandardlibrary
refqualifier
GCC链接器找不到标准库?
我一直在使用 XCode 开发一个学校项目 最终产品必须以带有 makefile 的源代码形式提交 因此我编写了一个 makefile 并开始以这种方式进行编译 以确保我有一个工作副本 这是我的生成文件 all main o StackLi
c
Linker
cstandardlibrary
为什么我们需要绑定 std::cin 和 std::cout?
默认情况下 标准输入设备与标准输出设备以以下形式绑定在一起 std cin tie std cout 这保证了在调用输入之前输出缓冲区已被刷新 所以我尝试使用来解开它们std cin tie 0 但看起来 结果 与并列的没有什么区别 inc
c
cstandardlibrary
Android ndk std::to_string 支持
我正在使用 android NDK r9d 和工具链 4 8 但我无法使用 std to string 函数 编译器会抛出此错误 error to string is not a member of std android ndk不支持这个
Android
c
androidndk
std
cstandardlibrary
POD 对包含标准库容器的结构的影响
我碰到this https stackoverflow com questions 5430801 c guarantee and name for pod like data memcpy capable最近提问 我的目标是了解 C 编译
c
C11
languagelawyer
cstandardlibrary
为什么使用 {} 来访问 std::hash 中的operator()?
在阅读用于 std unordered map 的 std hash 示例时 我注意到 operator 函数正在由 访问 http en cppreference com w cpp utility hash http en cppref
c
C11
Hash
unorderedmap
cstandardlibrary
为地图分配值的最有效方法
哪种方式为地图分配值最有效 或者它们都针对相同的代码进行了优化 在大多数现代编译器上 1 Assignment using array index notation Foo Bar 12345 2 Assignment using memb
c
Dictionary
std
stdmap
cstandardlibrary
将 nullptr 分配给 std::string 安全吗?
我正在做一个小项目 遇到了以下情况 std string myString GetValue returns a char myString myObject GetValue 我的问题是如果GetValue 返回 NULLmyString
c
string
cstandardlibrary
C++ 2011 中的 nextafter 与 nexttoward 函数?
C 2011 标准库的 nextafter 和 nexttoward 函数有什么区别 由于这些函数源自 C 因此它们不能重载 这意味着功能相同但具有不同参数 类型 的函数有两个不同的名称 以下是原始签名 float nextafter fl
c
floatingpoint
C11
cstandardlibrary
为什么需要 islower() 及其朋友来处理 EOF?
Why are islower 以及需要处理的朋友EOF 然而putchar 朋友们不需要吗 为什么不是islower 治疗int as unsigned char 就像情况一样putchar 这是完全有道理的 因为我们必须检查EOF无论如
c
glibc
cstandardlibrary
Boost.Filesystem 和 C++ 标准文件系统库有多相似?
我需要一个文件系统库与支持 C 11 的编译器或支持 C 14 的编译器一起使用 所以它不能来自 C 17 现在 我知道进入 C 17 的文件系统库是基于 Boost Filesystem 的 但是 它们是否足够相似 足以让我使用 Boos
c
C11
C17
cstandardlibrary
boostfilesystem
1
2
3
4
»