Classes | Functions
test_cpp.cxx File Reference
#include <string>
#include <iostream>
#include <vector>

Go to the source code of this file.

Classes

struct  Person
 

Functions

void fill_people (std::vector< Person > &people)
 
int main ()
 

Function Documentation

void fill_people ( std::vector< Person > &  people)

Definition at line 12 of file test_cpp.cxx.

13 {
14  Person guy{"Joe", 1}, gal{"Jane", 2}; // fancy initializing
15  people.push_back(std::move(guy));
16  people.push_back(std::move(gal));
17 }
def move(depos, offset)
Definition: depos.py:107
int main ( void  )

Definition at line 19 of file test_cpp.cxx.

20 {
21  std::vector<Person> people;
22  fill_people(people);
23 
24  for (auto peep : people) {
25  std::cout << " #" << peep.id << ": " << peep.name << std::endl;
26  }
27 }
void fill_people(std::vector< Person > &people)
Definition: test_cpp.cxx:12
QTextStream & endl(QTextStream &s)