Hey guys, Could you tell me what is wrong with this part of my code:
#include <iostream>
using namespace std ;
class TwoD
{
public:
TwoD ( ) ;
TwoD ( int , int ) ;
private:
int *m ;
int d1 ;
int d2 ;
};
int main ( )
{
int d1 , d2 , j , k ;
cout << "Enter row and column dimensions: " << flush ;
cin >> d1 >> d2 ;
TwoD m1 ( d1 , d2 ) ;
cout << Enter " << d2 << " rows of " << d2 << " doubles each\n"
for ( k = 0 ; k < d1 ; k++ )
for ( j = 0 ; j < d2 ; j++ )
cin >> m1 ( k , j ) ;
...
return 0 ;
}
I get an error that says
Term does not evaluate to a function taking 2 arguments
This happens at the last line of the code you see.