Yurttas/PL/OOL/Cplusplus/F/02/04/021/01/00/f a.cpp

From ZCubes Wiki
Jump to navigation Jump to search
 1/*
 2   Copyright(C) 2002
 3   All Rights Reserved. Salih Yurttas, ZCubes, BitsOfCode Software Systems, Inc..
 4
 5   Permission to use, copy, modify, and distribute this
 6   software and its documentation for EDUCATIONAL purposes
 7   and without fee is hereby granted provided that this
 8   copyright notice appears in all copies.
 9
10   date   : June 1, 2002.
11   author : Salih Yurttas.
12
13   f_a.cpp
14*/
15
16
17#include <vector>
18
19using namespace std;
20
21#include "common.h"
22
23vector< vector<int> > f_a() {
24  vector<int> v;
25  vector< vector<int> > vv;
26
27  for(int i=0; i<M; i++) {
28    for(int j=0; j<N; j++)
29      v.push_back(2);
30
31    vv.push_back(v);
32    v.clear();
33  }
34
35  return vv;
36}