0
Я написал следующий код в CodeBlocks (C++):кодоблок ошибки для кортежа в C++
#include <bits/stdc++.h>
using namespace std;
int main(void)
{
vector<int> v;
tuple<int,int,int> t1 = make_tuple(1,2,3)
tuple<char,int,double,int,long long int >t2;
t2=make_tuple('a' , 2 , 2.3 , 1 , 10000);
cout<< get<2>t1 << " "<< get<0> t2;// will print 3 and 'a'
}
Когда я подсказывать компиляции, он показывает много ошибок. Одна ошибка:
no match for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and '<unresolved overloaded function type>')|
Может ли кто-нибудь сказать мне, в чем причина? Я не хватает файлов библиотеки?
спасибо, понял. –