Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using namespace std;
- template <typename Tip>
- Tip *KreirajNiz(int n, Tip c) {
- try {
- Tip *pok=nullptr;
- pok=new Tip[n];
- for (int i=0; i<n; i++)
- pok[i]=c;
- return pok;
- }
- catch (bad_alloc) {
- throw "Kreiranje nije uspjelo.";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement