Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Huge insertions and calculations on vectors

$
0
0

Hi,

My program enters the size the of the vector from the user and then creates a vector of vectors (lets say SIZE1). In addition the user enters the number of vector of vectors he needs (lets say SIZE2) as follows:

class Vectors
{
// member functions goes here
private
vector<vector<int>> vectors;
vector<int>::iterator it;
};

void main()
{
...
A = new Vectors*[SIZE2];
for (int i=0; i<SIZE2; i++)
     A[i] = new Vectors[SIZE1];
...

With a few calculations and insertions to my vector (vector of vectors)... the program works fine and gives me the results...

However, with huge calculations and insertions the program stops working without any runtime error...

At first, I thought the vector is reaching its limit, but when searching I found that when this happens I should have a runtime error...

what would be the reason of a program stopping its execution without any runtime error after too many insertions and calculations on the vector?

best regards,

Nouf


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>