i have a function that seems simple but you know those simple ones.
i am also getting this errorCode:void Vecs (vector <int> & v1, vector <int> & v2, int s1, int s2) { for (int i = 0; i < v1.size() and i < v2.size(); i++) { v1[i] = srand(s1) % RND_NO_RANGE + 1; v2[i] = srand(s2) % RND_NO_RANGE + 1; } }
the warning on 91 is an unwritten function and on 107 i am not sure what the warning is.Code:ub2.cc: In function ‘void Vecs(std::vector<int, std::allocator<int> >&, std::vector<int, std::allocator<int> >&, int, int)’: sub2.cc:91: warning: comparison between signed and unsigned integer expressions sub2.cc:91: warning: comparison between signed and unsigned integer expressions sub2.cc:93: error: void value not ignored as it ought to be sub2.cc:94: error: void value not ignored as it ought to be sub2.cc: In function ‘void print_vec(const std::vector<int, std::allocator<int> >&)’: sub2.cc:107: warning: comparison between signed and unsigned integer expressions
could someone help me get rid of this error




Reply With Quote