I am trying to return a array of structs in my class but I keep getting an error
error C2556: 'cellValue *LCS::LcsLength(std::string,std::string)' : overloaded function differs only by return type from 'cellValue LCS::LcsLength(std::string,std::string)'
when I return in my .cpp file
My class declaration is:
enum arrow {UP, LEFT, DIAGONAL};
struct cellValue
{
int stringLenght;
arrow direction;
};
class LCS
{
public:
cellValue LcsLength (string, string);
};
And when I try returning in my function I have:
cellValue LCS::LcsLength (string X, string Y)
{
cellValue table[1024][1024];
return table;
}
cellValue * LcsLength(std::string,std::string)andcellValue LcsLength(std::string,std::string). The code you posted will have different errors.