All pastes #905732 Raw Edit

Mine

public cpp v1 · immutable
·published 2008-02-16 00:01 UTC
rendered paste body
#include <cstdlib>#include <iostream>#include <vector>/* lill-me's test-vektor program. Designed and Code bylill-me */using namespace std;struct house{       int antal; // Hur många som bor där       vector<string> namn; // Namnen};int main(int argc, char *argv[]){    house howmany;    cout << "How many people should live in the house: ";    cin >> howmany.antal;    system("clear");    for(int i=0; i <= howmany.antal; i++)    {            string temp;            cout << "Enter the names of the persons in the house: ";            getline(cin,temp);          howmany.namn.push_back(temp); // Sparar personerna i vectors "names"            }            cout << "The names on the persons  that live in the house are the following:\n";            for(vector<string>::iterator i = howmany.namn.begin(); i !=howmany.namn.end(); i++)            {                                         cout << "" << *i <<"\n"; // Ska uppenbarligen lista ut sakerna i min vector            }    system("PAUSE");    return EXIT_SUCCESS;}