#include<iostream>
struct square
{
void operator( )(int &x)
{
x = x*x;
}
};
int main(int argc, char** argv)
{
square SquareFunc;
int x = 5;
SquareFunc(x);
std::cout <<x<<std::endl;
return 0;
}
#include<iostream>
struct square
{
void operator( )(int &x)
{
x = x*x;
}
};
int main(int argc, char** argv)
{
square SquareFunc;
int x = 5;
SquareFunc(x);
std::cout <<x<<std::endl;
return 0;
}