What does the reference operator do in this case:
Code:
const dataset_buf& read_data_set (const string& dataname) {
How would I use this function? dataset_buf is another class, this function mentioned above is in the class "dataset_loader". It is supposed to return a reference to dataset_buf.
Code:
class dataset_loader {
public:
static void Init () { Exception::dontPrint(); }
dataset_loader (const string& filename) : hdf5_file(filename, H5F_ACC_RDONLY), datasets() {}
~dataset_loader () {hdf5_file.close(); }
const dataset_buf& read_data_set (const string& dataname) {
Code:
class dataset_buf{
dataset_buf& operator= (const dataset_buf& other) { ...