0

Hello!

Just wondering if someone might see what is wrong with this piece of code. I am trying to get the number of rows in resultsDaily so that my for loop may start at that number, so as to append the matrix.

here are my header files:
#include <iostream>
#include <math.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>

and the code:

double **copyMatrix(double **results, double **resultsDaily, int NumPar, int Column)
{
	int CountRows = resultsDaily.GetRows(); 
	for (p=CountRows; p<NumPar+CountRows; p++)
	{
		for (m=Column; m<Column+1; m++)
		{
			resultsDaily[p][Column] = results[p][(Column+1)-Column];
		}
  
	}
 
 return resultsDaily;

}

error C2228: left of '.GetRows' must have class/struct/union

I guess it doesnt like the way I am using resultsDaily in the getRows() function, but I'm not sure how else to deliver it. Any ideas?

Thank you so much :-)

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Banfa
0

resultsDaily has type double**, to use . you need the thing on the left to have a class/structure/union type.

Even if you dereferenced resultsDaily a couple of time this would not be the case since its basic type is double.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.