Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- int main(void)
- {
- vector < vector< vector<bool> > > buff;
- for (int i = 0; i < 10; i++)
- {
- vector < vector<bool> > tempy;
- for (int i = 0; i < 10; i++)
- {
- vector<bool> temp;
- for (int j = 0; j < 10; j++)
- {
- temp.push_back(true);
- }
- tempy.push_back(temp);
- }
- buff.push_back(tempy);
- }
- for (vector < vector<vector<bool> > >::iterator ht = buff.begin(); ht != buff.end(); ++ht)
- {
- cout << "New line --------> " << endl;
- //it is now a pointer to a vector < vector<bool> >
- for (vector<vector<bool> >::iterator it = ht->begin(); it != ht->end(); ++it)
- {
- //it is now a pointer to a vector<bool>
- cout << "Value : ";
- for (vector<bool>::iterator jt = it->begin(); jt != it->end(); ++jt)
- {
- // jt is now a pointer to a boolean.
- cout << *jt;
- }
- cout << endl;
- }
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement