Well, I don't know if this is what you would call an anonymous function, or "Lambda" function I guess, I haven't really gotten that far into languages that use them yet...
but, I am writing a function that is rather long. And I want to just get through it, and then break it into smaller functions.
While I am writing it, I'm taking out pieces which I think I will later put into their own functions, by just wrapping them in { } braces. like, I know I can just do this:
int largefunc(){
int a;
{
a=5
}
return a;
}
and I know this is totally incorrect, but I wonder if I can do something like it in C++:
int largefunc(){
int a;
a={
return 5;
}
return a;
}
I suppose I don't really need this at all, it'd just be good to know if it's possible.
oh, also, totally unrelated, is it bad practice to put an assignment in an if statement? if((a=b)==5){ }