std

std

文章 0 浏览 7

ADL与当前名称空间中的功能发生冲突

我的命名空间中有一个功能。它的名称是销毁。 std 命名空间还包含 and nofollow noreferrer' 。当我在命名空间中调用我的功能时,调用是模棱两可的,…

内心荒芜 2025-01-30 15:24:45 2 0

std ::有条件参数上的模板功能扣除失败

请,在将其标记为这个问题读取整个帖子 此代码无法编译,并没有模板扣除错误: #include #include template class MyClass { public: template using …

摘星┃星的人 2025-01-29 23:11:29 3 0

调用C++来自C文件的标准标头(CSTDINT)

我有一个用C ++编写的外部库,例如 external.h #ifndef OUTPUT_FROM_CPP_H #define OUTPUT_FROM_CPP_H #include extern "C" uint8_t myCppFunction(ui…

随心而道 2025-01-27 12:32:27 3 0

如何仅读取std :: basic_ostream的某些符号(例如std :: cin)

#include #include #include #include int main () { std::vector words{}; std::string word; char letter; while (std::cin.get(letter) && letter …

浅唱々樱花落 2025-01-27 10:19:01 2 0

C++将无现有元素从一个向量复制到另一个矢量

我有这样的课程: struct DataElement { std::string key; std::string value; std::string placeholder; // some other data members } 我将它们存储…

dawn曙光 2025-01-27 07:55:06 2 0

是否有一种使用方法(std :: cin).get()在要求输入时接受新线?

(std :: cin).get() 我想使用std :: cin收集带有空间的弦,例如“花1/2盎司”。当我添加一个空间然后按Enter IT退出程序时,而不是收集其余的输入…

弥繁 2025-01-27 05:32:10 1 0

源自std :: pinitializer_list是合法的吗?

我可以将 std :: prinitizer_list 列表作为基类吗? template struct il : std::initializer_list { using base = std::initializer_list; il(base li…

泅渡 2025-01-26 17:06:12 2 0

如何找出std :: vector中是否存在项目?

我要做的就是检查矢量中是否存在一个元素,以便我可以处理每种情况。 if ( item_present ) do_this(); else do_that(); …

不乱于心 2025-01-25 20:50:11 3 0

如何将已知签名的特定对象存储在C++中的变量中?

在某些对象实例上存储对特定签名的非静态成员函数的引用的推荐方法是什么?在调用代码不知道对象类(即没有铸件)的方式中,该功能是正确的签名。 例…

月棠 2025-01-25 11:23:35 2 0

在这种情况下,为什么STD ::移动原因是Segfault?

为什么在这种情况下 std :: move()导致segfault? #include struct Message { std::string message; }; Message * Message_Init(std::string messag…

梦罢 2025-01-24 08:42:38 1 0

“使用命名空间std;&quot”的问题是什么?

我已经听到使用命名空间std; 是错误的,并且我应该使用 std :: cout 和 std :: cin cin 直接而代替。 为什么这是?它是否会宣布与 std 名称空间中的内…

[旋木] 2025-01-23 19:24:11 3 0

如何使用__cpp_lib_*功能测试宏?

我想使用功能测试宏检查 std :::::::::::::::::: FileSystem 可用,但是即使我知道 std :: filesystem , __ cpp_lib_filesystem 也无法定义。例如,…

无人问我粥可暖 2025-01-23 17:44:35 2 0

到达结束后,如何附加到std :: fstream(std :: fstream :: eof()是真的)

我打开一个这样的文件(因为它是练习的一部分,可能需要覆盖文件): #include //std::fstream. std::fstream file("file.txt", std::ios::in | std::…

追风人 2025-01-23 17:20:31 3 0

关于使用STD :: Numeric_limits< t> :: Infinity()的算术操作

我有一个奇特的用例,其中我的边缘带有最初设置为 std :: numeric_limits< double> :: Infinity()的权重。这些权重将在程序执行中以后设置…

栖迟 2025-01-22 08:27:38 3 0

如何在C++中解决此运行时间错误? - “围绕变量的堆栈已损坏”。

我尝试获得 的最小 两个整数,实数, strings ,,和整数数组通过实现获得与功能超载的功能。 所以我写这样的代码 #include #include using namespace…

穿透光 2025-01-22 08:01:36 4 0
更多

推荐作者

夢野间

文章 0 评论 0

百度③文鱼

文章 0 评论 0

小草泠泠

文章 0 评论 0

zhuwenyan

文章 0 评论 0

weirdo

文章 0 评论 0

坚持沉默

文章 0 评论 0

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文