I have another problem that I can seem to get around in C++. I have a class that is a multi dimensional array. I m trying to initialize the array using an init function and having problem passing it to the function. My code is posted below:
// classes example
#include <iostream>
#include <stdlib.h>
#include <fstream>
#include <iomanip>
using std::ifstream;
using namespace std;
class Cache {
int LRU_counter;
public:
void set_counter (int);
int _LRU_counter () {return (LRU_counter);}
};
Several things. For your last defined function, you need to specify the depth of the array in its second dimension (like [][size]). Soz.
Second, you mis-declared your L1_LRU_Counter_Init to take as an argument a single Cache. No no, you want to declare it to take a Cache data[][size]. Else chaos ensues.