Thursday 29 November 2018

Google + Content reposting - Mar 8 2015 - 2


Digital and Interactive Games 2015 – Week 4, Session 2
Vector of Vectors
#include <vector>
#include <iostream>

int main() {
    std::vector<int> aVector;
    std::vector<std::vector<int>> aVectorOfVector;
    // First lot of vector
    for (auto i = 0; i != 10; ++i)
        aVector.push_back(i);
    aVectorOfVector.push_back(aVector);
    // Second lot
    aVector.clear();
    for (auto i = 0; i != 10; ++i)
        aVector.push_back(i + 20);
    aVectorOfVector.push_back(aVector);
    for (auto v ; aVectorOfVector) {
        for (auto i; v)
            std::cout << i << “ ”;
        std::cout << std::endl;
    }
    return 0;
}

Access linker subsystem VS2013
Project
    'Project Name' Properties


#cplusplus   #gamedesign   #gameprogramming   #programming   #tafe  





No comments:

Post a Comment