Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- template<typename T,int n>
- class klasa
- {
- T tab[n];
- public:
- klasa(){}
- T& operator[](int i)
- {
- return tab[i];
- }
- template<typename M>
- void add(M liczba)
- {
- for(int i = 0 ; i<n;i++)
- tab[i]+=liczba;
- }
- template<>
- void add(string a){}
- };
- int main()
- {
- //cout << << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement