Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- template<class S>
- class Liczba
- {
- S wartosc;
- public:
- void wczytaj();
- void wypisz();
- };
- template<class S>
- void Liczba<S>::wczytaj()
- {
- cout<<"\tWprowadz liczbe: " ;
- cin>>wartosc;
- }
- template <class S>
- void Liczba<S>::wypisz()
- {
- cout<<"\tWartosc ktora przechowuje program: "<<wartosc<<endl ;
- }
- main()
- {
- Liczba <float>l1;
- l1.wczytaj();
- l1.wypisz();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement