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 :-)

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.