/*I am getting the following errors
free.cpp: In function 'int main()':
free.cpp:24: error: expected `;' before 'obj'
free.cpp:25: error: 'obj' was not declared in this scope
free.cpp:25: error: expected primary-expression before 'int'*/
#include<iostream>
using namespace std;
int array[]={0,1,2,3,4,5,6,7,8,9};
class free
{
public:
void function(int array[]);
};
void free::function(int array[])
{
for (int i=1;i<=10 ;i++ )
{
cout<<array[i];
}
}
int main()
{
free obj;
obj.function(int array[]);
return 0;
}