Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //253063 Marcin Czerniawski
- #include<iostream>
- #include<vector>
- #define n 5
- using namespace std;
- vector<int> *zmien(int tab[])
- {
- vector<int> *wsk=new vector<int>;
- for(int i=0;i<n;i++)
- {
- (*wsk).push_back(tab[i]);
- }
- return wsk;
- }
- int main()
- {
- int tab[n]={1,2,3,4,5};
- vector<int> *nowy=new vector<int>;
- nowy=zmien(tab);
- cout<<nowy;
- delete nowy;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement