c++ - Incomplete type is not allowed 错误和元组

标签 c++ visual-c++ std

所以我面临这个错误

Incomplete type is not allowed

#include "stdafx.h"
#include <iostream>
#include <conio.h>
#include <ctype.h>
#include <sstream>
using namespace std;

int main()
{
    std::tuple<int, bool, float> human = {345, true, 2.33}; 
    // Incomplete type is not allowed  

    system("pause");
    return 0;
}

有什么线索吗?

最佳答案

您需要 #include <tuple>能够使用它。

关于c++ - Incomplete type is not allowed 错误和元组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38209467/

相关文章:

c++ - c++ Clion 和 VS2019 中的纯虚拟析构函数

c++ - 我可以将 iostream 头文件包含到自定义命名空间中吗?

c++ - 类对象的 vector 及其实例化

c++ - 如何从 C++ 中安全地转义字符串

c++ - 我正在使用 std::bitset 并尝试创建两个大小为 100,000,000,000 的数组 std::bitset

mysql - CFile + WriteHuge 不工作

visual-c++ - 伪造 ASM 返回地址?

c++ - std::multiset 和上限和下限的奇怪行为

c++ - 高效布局和减少虚拟2D数据(抽象)

c++ - boost 不相交集:如何检索集?