All pastes #898536 Raw Edit

zad1.cpp

public text v1 · immutable
·published 2008-02-10 12:22 UTC
rendered paste body
#include <iostream>     // zad1.cpp

template <class type>
class konto
	{
	private :
		type stan;
	public :
        // konstruktory
		konto() { stan=0; }
		konto(type x) { stan=x; }
		
		// zwrocenie elementu stan
		type get() { return stan ; }
	};

using namespace std;

int main() {
    
    konto<int> obj1(4);
    konto<float> obj2(0.25);
        
    cout << obj1.get() << endl;    
    cout << obj2.get() << endl;    
    
    system("PAUSE");
    
    return 0;
    }