Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Incomplete type is not allowed error and a tuple

So I am facing this error

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;
}

Any clue?

like image 313
Friend Avatar asked Jul 05 '16 17:07

Friend


1 Answers

You need to #include <tuple> to be able to use it.

like image 162
Jesper Juhl Avatar answered Oct 20 '22 14:10

Jesper Juhl