Terminal dump - July 19, 2005

Here is everything I typed into the terminal in lab the evening of the 19th: (I hope it helps!)

pierb507p01% cd eng101/examples
pierb507p01% ls
a.out intToString.cpp staticCastExample.cpp vectorvector.cpp wert
intr logictest.cpp stringToInt.cpp vv
pierb507p01% vv

This program creates a vector of vectors (called a table)
and fills each element with either a zero or one, based on
a user-specified probability.

Please input size of list to be input: 10

Please input the probability of having a one in each element: 0.3

1 1 1 1 1 0 1 1 0 1
1 1 1 1 1 1 1 1 0 1
0 0 0 1 0 1 0 0 1 0
1 1 1 0 1 1 1 1 0 1
1 1 1 1 0 1 1 1 0 1
1 0 0 1 1 1 0 0 1 0
0 1 1 1 0 1 1 1 1 1
1 0 1 1 1 1 0 1 1 1
1 0 1 1 1 1 0 1 1 1
1 1 1 1 1 1 1 1 1 1

106pierb507p01%
pierb507p01%
pierb507p01% g++ vectorvector.cpp -o vv
pierb507p01% ls
a.out intToString.cpp staticCastExample.cpp vectorvector.cpp wert
intr logictest.cpp stringToInt.cpp vv
pierb507p01% vv

This program creates a vector of vectors (called a table)
and fills each element with either a zero or one, based on
a user-specified probability.

Please input size of list to be input: 10

Please input the probability of having a one in each element: 0.1

1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 0 1
1 0 1 1 1 1 0 0 1 0
1 1 1 1 1 1 1 1 1 1
1 0 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1

pierb507p01% g++ vectorvector.cpp -o vv
pierb507p01% vv

This program creates a vector of vectors (called a table)
and fills each element with either a zero or one, based on
a user-specified probability.

Please input size of list to be input: 10

Please input the probability of having a one in each element: 0.1

0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0
0 1 0 0 0 0 1 1 0 1
0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0

pierb507p01% g++ vectorvector.cpp -o vv
pierb507p01% vv

This program creates a vector of vectors (called a table)
and fills each element with either a zero or one, based on
a user-specified probability.

Please input size of list to be input: 6

Please input the probability of having a one in each element: 0.1

0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

6pierb507p01% g++ vectorvector.cpp -o vv
vectorvector.cpp: In function `int main()':
vectorvector.cpp:96: no matching function for call to `
std::vector<std::vector<int, std::allocator<int> >,
std::allocator<std::vector<int, std::allocator<int> > > >::pushback(int)'
pierb507p01% g++ vectorvector.cpp -o vv
pierb507p01% vv

This program creates a vector of vectors (called a table)
and fills each element with either a zero or one, based on
a user-specified probability.

Please input size of list to be input: 5

Please input the probability of having a one in each element: 0.1

0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
1 0 0 0 0

5pierb507p01% g++ vectorvector.cpp -o vv
pierb507p01% vv

This program creates a vector of vectors (called a table)
and fills each element with either a zero or one, based on
a user-specified probability.

Please input size of list to be input: 6

Please input the probability of having a one in each element: -

0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

6 3 pierb507p01% g++ vectorvector.cpp -o vv
pierb507p01% vv

This program creates a vector of vectors (called a table)
and fills each element with either a zero or one, based on
a user-specified probability.

Please input size of list to be input: 6

Please input the probability of having a one in each element: 0.1

0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

6 3
pierb507p01% g++ vectorvector.cpp -o vv
pierb507p01% vv

This program creates a vector of vectors (called a table)
and fills each element with either a zero or one, based on
a user-specified probability.

Please input size of list to be input: 6

Please input the probability of having a one in each element: 0.1