配对中的错误[关闭]

问题描述 投票:-1回答:1

我已声明以下内容:

set< pair<string, pair< int, vector<int> > > SS;

为什么我会收到以下错误?

temp.cpp: In function ‘int main()’:
temp.cpp:13:50: error: template argument 1 is invalid
     set< pair<string, pair< int, vector<int> > > SS;
                                                  ^
temp.cpp:13:50: error: template argument 2 is invalid
temp.cpp:13:50: error: template argument 3 is invalid

source

c++ stl set
1个回答
1
投票

你错过了一个>。您的代码应如下所示:

set< pair<string, pair< int, vector<int> > > > SS;
© www.soinside.com 2019 - 2024. All rights reserved.