Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename T>
- class Cos
- {
- private:
- vector<T> chestii;
- public:
- Cos() = default;
- /*Cos(Cos<T>& ot)
- {
- chestii.size() = ot.size();
- for (int i = 0; i < chestii.size(); i++)
- {
- chestii[i] = ot.chestii[i];
- }
- }*/
- Cos& operator+(const T& elem)
- {
- chestii.pb(elem);
- return *this;
- }
- Cos& undo()
- {
- chestii.erase(chestii.begin() + chestii.size()-1);
- return *this;
- }
- void operator=(const Cos<T>& ot)
- {
- chestii = ot.chestii;
- }
- void tipareste(ostream& s)
- {
- for (unsigned int i = 0; i < chestii.size(); i++)
- s << chestii[i]<<" ";
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement