i know vague question , possibly horribly worded, beginner in c++ , keep seeing (btw copied code off of someone's post):
if ( contents[i].size() >= 5 ) { ( unsigned int j=3; j<4; ++j ) { double value = contents[i][j]; contents[i][j] = 0.; } } what "[i][j]" part mean in contents[i][j] = 0.;? familiar using 1 [i], i've never used two... can tell me how using 1 [i] different using [i][j] , means use [i][j]?
sorry vague question, couldn't find answer this. thanks
content stores 2d array: array of array (probably std::vector< std::vector<double> >, thank @owacoder comment).
contents[i] accesses i's array of contents, std::vector<double>, , contents[i][j] acesses j's elements of i's array stored in contents.
Comments
Post a Comment