No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Given the trace program below. I basically need to store a 1 or a 0 to the corresponding `a[r[i]]` the problem is I need to be able to keep track of the index of vectors zero and one to check the last index that was used for each vector. For … |
|
Given a 7x4 array generate four random numbers from the array with no repetition. I can already generate four random numbers the problem is the repetition part. Here's my code so far int f[4]; int s[4]; for( i = 0; i < 4; i++) { // use as index for … |
|
I have this code that supposed to display the values from an array to a text file #include <iostream> #include <cstdlib> #include <fstream> #include <vector> using namespace std; int array[7][4]; fstream file2; template< typename T > void display( const vector< vector<T> >& matrix ) { for(int i = 0; i … |