GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Friday, March 18, 2011

CPP - Vector Without Iterator

#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>

using namespace std;

int main(int argc, char *argv[]){
    system("color 2f");

    vector <string> name;

    name.push_back("Luna Maya");
    name.push_back("Aura Kasih");
    name.push_back("Lady Gaga");

    for(int i=0;i<name.size(); i++){
        cout << name[i] << endl;
    }

    return 0;
}



Share/Bookmark

No comments:

Post a Comment