All pastes #11848 Raw Edit

Skudd

public cpp v1 · immutable
#11848 ·published 2005-05-16 02:24 UTC
rendered paste body
#include <iostream>#include <vector>#include "binary_node.h"using namespace std;vector<binary_node> v;void PrintV();int main() {	v.push_back(new binary_node(true, false));	v.push_back(new binary_node(v[0]));	v.push_back(new binary_node(!v[1]));	v.push_back(new binary_node(true, true));	v.push_back(new binary_node(!v[3]));	v[3].Reverse();	PrintV();	v.pop_back();	PrintV();	return 0;}void PrintV() {	cout << "vector<binary_node> v (global vector)" << endl		<< "-------------------------------------" << endl;	for(unsigned int i = 0; i < v.size(); i++) {		cout << "<binary_node>[" << i << "] => ";		v[i].PrintVal();	}	cout << "\n";}