look at the argument list for the function fun() -- it requires three parameters; two integers and a char*. Now look at how you are trying to call that function in main(). It is only passing one parameter instead of three.
This compiles correctly with vc++ 2010 express. Note the last dimension must be 6 instead of 5 because "13.40" requires 6 bytes including the null terminator.
const char var[][2][6]={
{"1.95","3.70"},
{"2.40","4.60"},
{"2.70","5.70"},
{"6.60","13.40"}
};
void fun(int col,int row,const char *str)
{
}
int main()
{
fun(0,0,var[0][0]);
}
Ancient Dragon
Achieved Level 70
32,139 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,577
Skill Endorsements: 69
Question Answered as of 1 Year Ago by
Ancient Dragon