Today when I read C++ Primer ,it said in-class initializer can't use () I have searched on Stackoverflow and find a similar question here.And the accepted answer say:the reason might be that there is a ambiguous between declaration of a member function and definition of a member of type.But I am not complete agree with him.I try the following code:
struct Sales_data
{
int i(5); //this line can't be regard as a function
};
But the compiler still complain.Who can tell me why.\ compiler:clang++ version:3-4