c++ - passing allocated pointer before it allocated -
I am studying open source project ROS when I saw strange code The variable server is used before assigning it as server . Is this possible? At least, my Visual Studio 2010 Compiler does not understand that style of code. Please tell me whether this is actually a possible code or not. The original document of the code: --------- Added Thanks for your kindness, however, the "server" Found: The undisclosed identifier "error when I compile it." So I tested the simple code This also creates the same error "TT: Undeclared identifier" am I forgetting something? Please Help me. This is legal when they are declared, then the variable is in the radius, this rule exists to create self-referenced data-structures in a row. The object can point as long as the object is not created. Since the indicator is being passed in the
Server server (n, "do_dishes", boost :: bind (and executed, _1, and server), incorrect);
class TestCls {public: TestCls (TestCls * AA) {}}; int main (int argc , Char ** argv) {TestCls TT (& amp; टीटी);}
server constructor, it works, Unless the
server function object is colored Before doing the right forward.
Comments
Post a Comment