Category : arrays

C++ Help Can functions void menuSwitchListEmployees(), char menuOptionListEmployees(), void menuSwitchEmployees char menuOptionEmployees(), and void readDataFromFile be explained each in short sentences? Thank you. C++ Help Can functions void menuSwitchListEmployees(), char menuOptionListEmployees(), void menuSwitchEmployees char menuOptionEmployees(), and void readDataFromFile be explained each in a few sentences? Thank you. EmployeeList.h #pragma once #include <fstream> #include <iostream> #include ..

Read more

#include <bits/stdc++.h> using namespace std; int main() { array<vector<int>,10>arr1; arr1[0].push_back(1); arr1[0].push_back(2); arr1[0].push_back(3); arr1[1].push_back(4); arr1[1].push_back(5); arr1[2].push_back(6); arr1[7].push_back(100); for(auto i:arr1){ for(auto j :i) cout<<j<<" ";cout<<"n";} } I’m creating array of vectors and pushing some values and I can’t figure out how to make remaining places zeros. I have an idea , first making all vectors inside each ..

Read more