i write follow code:
static int count = []()->int
{
int count = 0;
for(int i = 0; i < categories.size(); ++i)
{
if(!categories[i].isCategory())
{
count++;
}
}
return count;
};
and got error:error: cannot convert '__lambda0' to 'int' in initialization.
does the meaning of my code fragment is assign the __lambda0 to static int count instead of return the inner count?