Quote Originally Posted by CornedBee View Post
Yes.



You first have to create an object (explicit constructor call, foo()) and then you can call the function call operator on it, so it's foo()().

That said, I wouldn't look kindly on such code. The correct way to privatize functionality is by putting it into its own file.
Well, that's what I was already planning to do, i.e. have each major function in its own file, which I then include in the main source code file. But I was hoping I could have a function within the main.cpp file that would be part of the class "main_window_form" for the purpose of adding variables to the class.
I guess I'll have to try the method matsp suggested, i.e. use a derived class for adding variables.
Thanks everyone for your help. I really appreciate it.