how solve thos errors

I have in main include .h

#include <iostream>
#include <string>
#include "TwoDimArray.h"

using namespace std;
int main()

TwoDimArray Array1( 3,4);

print( Array1[0][0], 3, 4);
-------------------------------
the question is why do not recognize print function in main

: error: âprintâ was not declared in this scope


and I have in the .h and the .cpp file


void print(int** ,int , int);// .h file


void TwoDimArray::print(int** arr, int x , int y)// .cpp file

Ok ......Array1.print()
I did but I got those errors

.cpp: In function âint main()â:
.cpp:25: error: invalid conversion from âintâ to âint**â
.cpp:25: error: initializing argument 1 of âvoid TwoDimArray::print(int**, int, int)â
Array1[0][0] is an int, not an int**. I think you just want to pass the array (Array1).
Yes but where is the definition of the print function which identifies the printing method?
Topic archived. No new replies allowed.