Referati. Konteynerlar
return 0; } #include #include #include using namespace std
Download 106.9 Kb.
|
referat
return 0;
} #include #include #include using namespace std; int main(){ array<int,5> a={15,8,9,45}; for(auto i=a.begin(); i!=a.end(); i++){ cout<<*i<<" "; cout< return 0; } Vector: #include #include using namespace std; int main(){ vector<int> tata, a={15,8,9,45,7}; int b=a.size(); for(int i=0; itata.push_back(a[i]); } cout<<"takrorlanishlar soni "<return 0; } #include #include using namespace std; int main(){ vector int b=a.size(); for(int i=0; itata.push_back(a[i]); } cout<<"takrorlanishlar soni "<return 0; } #include #include using namespace std; int main(){ vector int b=a.size(); for(int i=0; itata.push_back(a[i]); } tata.push_back("Samandar "); cout<<"takrorlanishlar soni "<tata.erase(tata.begin()+1); tata.pop_back(); for(auto i:tata){ cout<} return 0; } 3. Deque: #include #include using namespace std; int main(){ deque tata.push_back(45); tata.push_front(15); tata.push_front(95); tata.push_front(70); for(auto i:tata) cout<return 0; } #include #include using namespace std; int main(){ string b="Eldor"; deque for(auto i:talaba) if(b==i){ cout<} else{ cout<<"Bunday ma'\lumot mavjud emas "; } return 0; } 4. List:
#include using namespace std; int main(){ list talaba.remove("Samandar"); for(auto i:talaba) cout<return 0; } 5. Map:
#include Download 106.9 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling