I am making some testing of vectors arrays and I don't know how to print it. Here is my code:
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include "vector"
#include <windows.h>
using namespace std;
vector<vector<int>> generateArrays(){
vector<vector<int>> cisla;
for(unsigned int i=1; i < 11; i++){
vector<int> pole;
vector<int> pole2;
for(unsigned int j=0; j < i*5; j++){
int a = rand();
pole.push_back(a);
pole2.push_back(a);
}
cisla.push_back(pole);
cisla.push_back(pole2);
}
return cisla;
}
vector<vector<int>> arrays = generateArrays();
void Print (const vector<int>& arrays){
// function for prinitng arrays
}
int main(){
Print(arrays);
system("pause");
}
What I need is some function to write down all numbers in vector arrays. I tried to Google it but none of the code work for me.