Exemplo n.º 1
0
void test_template4()
{
	pair <int> myints(100, 75);
	pair <float> myfloats(100.0, 75.0);

	std::cout << myints.module() << std::endl;
	std::cout << myfloats.module() << std::endl;
}
Exemplo n.º 2
0
int main ()
{
  const int buffer_size = 100;
  int buffer[buffer_size];
  Priority_queue<int> myints(buffer, buffer_size);
  std::cout << "0. size: " << myints.size() << '\n';

  for (int i=0; i<5; i++) myints.push(i);
  std::cout << "1. size: " << myints.size() << '\n';

  myints.pop();
  std::cout << "2. size: " << myints.size() << '\n';

  return 0;
}
Exemplo n.º 3
0
int main() {
	mypair<int> myints(100, 75);
	printf("%d\n", myints.getmax()); // 100
	return 0;
}