When i compile this prog, i get errors sayin
2.Each undeclared identifier is reported only once for each function it appears in. what is the problem here with declaration of an array of vectors??
using namespace std;
@zhuge yep i've got it.. but for declaring an array of vectors,, i need a loop.. so how do i define it in a better scope,, i.e how do i define it such tat it can be accessed throughout the main() function??
There are two problems with the original code. d only exists within the scope of the first for statement, and one may not define an array with a variable that is not also a compile-time constant: i, although some compilers have an extension enabled by default that allows it.
Since you're already using a vector, why not just use a vector of vectors?