It works fine in VC++ but gives an error as "Undefined structure class name".
How can it work and give you an error at the same time?
See the changed code...and before asking why I changed some lines...do a search of this forum or google...
#include <iostream>
using namespace std;
class test
{
int k;
public:
void fun(test t[],int size)
{
cout<<"Test program....";
}
};
int main()
{
test t;
test r[2];
t.fun(r,2);
return 0;
}