7
std::vector<std::vector< std::pair<int, int> > > offset_table;
for (int i = 0; i < (offset.Width()*offset.Width()); ++i)
{
offset_table.push_back( std::vector< std::pair<int, int> > );
}
這是我的代碼,但我得到的錯誤:如何將一個空對矢量推回到另一個矢量?
main.cpp: In function ‘void Compress(const Image<Color>&, Image<bool>&, Image<Color>&, Image<Offset>&)’:
main.cpp:48:66: error: expected primary-expression before ‘)’ token
我不想在對任何價值,我只是想在此刻有空載體的載體。我將如何做到這一點?
我想你已經誤解了這個問題。我認爲這個問題是你如何將一個空矢量push_back到矢量矢量中。 – Owl 2016-07-24 23:01:31