Access “public” struct defined inside a classWhen should you use a class vs a struct in C++?Difference between 'struct' and 'typedef struct' in C++?Difference between private, public, and protected inheritancestruct vs class as STL functor when using not2Compiling and Using JSONCPP on Visual Studio10 with Booststruct or class and what about public data?Accessing the private data members of a struct that is in a namespaceerror LNK2001: unresolved external symbol, due to ifstream objectHow access to private members from a struct defined within a class? c++Accesssing a private struct defined in class by a friend or a member function

Impersonating user with Core Service App and Angular client

Science fiction episode about the creation of a living pegasus, even though flightless

Why are the wings of some modern gliders tadpole shaped?

Do my potential customers need to understand the "meaning" of a logo, or just recognize it?

Windows 10 deletes lots of tiny files super slowly. Anything that can be done to speed it up?

Looking for circuit board material that can be dissolved

Implementation of a Thread Pool in C++

Why isn't there armor to protect from spells in the Potterverse?

How to study endgames?

Was the ruling that prorogation was unlawful only possible because of the creation of a separate supreme court?

Why would an airline put 15 passengers at once on standby?

Is it possible for a company to grow but its stock price stays the same or decrease?

How do we know neutrons have no charge?

How important is knowledge of trig identities for use in Calculus

What organs or modifications would be needed to have hairy fish?

Top off gas with old oil, is that bad?

Is there an in-universe explanation of how Frodo's arrival in Valinor was recorded in the Red Book?

A word that refers to saying something in an attempt to anger or embarrass someone into doing something that they don’t want to do?

Realistically, how much do you need to start investing?

What does it mean by "my days-of-the-week underwear only go to Thursday" in this context?

Would a 737 pilot use flaps in nose dive?

Smallest PRIME containing the first 11 primes as sub-strings

Should I be on the paper from another PhD student that I constantly went on his meetings?

Why is the population of post-Soviet states declining?



Access “public” struct defined inside a class


When should you use a class vs a struct in C++?Difference between 'struct' and 'typedef struct' in C++?Difference between private, public, and protected inheritancestruct vs class as STL functor when using not2Compiling and Using JSONCPP on Visual Studio10 with Booststruct or class and what about public data?Accessing the private data members of a struct that is in a namespaceerror LNK2001: unresolved external symbol, due to ifstream objectHow access to private members from a struct defined within a class? c++Accesssing a private struct defined in class by a friend or a member function






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















I am trying to make a class whose private member has to access a struct defined with public access in the same class. I am using VS Code to write the code. When I try to write a private member function, it says the struct identifier is not defined.



class Planner

private:
typedef std::pair<int, int> location;
std::vector<location> obstacles;
Pose next_state(const Pose& current_state, const Command& command);

public:
Planner(/* args */);
virtual ~Planner();

/* data */
struct Command

unsigned char direction;
unsigned char steering;
;

struct Pose

int x;
int y;
int theta;
;

struct Node

Pose pose;
int f;
int g;
int h;
;
;



Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.










share|improve this question
































    2















    I am trying to make a class whose private member has to access a struct defined with public access in the same class. I am using VS Code to write the code. When I try to write a private member function, it says the struct identifier is not defined.



    class Planner

    private:
    typedef std::pair<int, int> location;
    std::vector<location> obstacles;
    Pose next_state(const Pose& current_state, const Command& command);

    public:
    Planner(/* args */);
    virtual ~Planner();

    /* data */
    struct Command

    unsigned char direction;
    unsigned char steering;
    ;

    struct Pose

    int x;
    int y;
    int theta;
    ;

    struct Node

    Pose pose;
    int f;
    int g;
    int h;
    ;
    ;



    Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.










    share|improve this question




























      2












      2








      2


      0






      I am trying to make a class whose private member has to access a struct defined with public access in the same class. I am using VS Code to write the code. When I try to write a private member function, it says the struct identifier is not defined.



      class Planner

      private:
      typedef std::pair<int, int> location;
      std::vector<location> obstacles;
      Pose next_state(const Pose& current_state, const Command& command);

      public:
      Planner(/* args */);
      virtual ~Planner();

      /* data */
      struct Command

      unsigned char direction;
      unsigned char steering;
      ;

      struct Pose

      int x;
      int y;
      int theta;
      ;

      struct Node

      Pose pose;
      int f;
      int g;
      int h;
      ;
      ;



      Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.










      share|improve this question
















      I am trying to make a class whose private member has to access a struct defined with public access in the same class. I am using VS Code to write the code. When I try to write a private member function, it says the struct identifier is not defined.



      class Planner

      private:
      typedef std::pair<int, int> location;
      std::vector<location> obstacles;
      Pose next_state(const Pose& current_state, const Command& command);

      public:
      Planner(/* args */);
      virtual ~Planner();

      /* data */
      struct Command

      unsigned char direction;
      unsigned char steering;
      ;

      struct Pose

      int x;
      int y;
      int theta;
      ;

      struct Node

      Pose pose;
      int f;
      int g;
      int h;
      ;
      ;



      Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.







      c++






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 28 at 19:40









      πάντα ῥεῖ

      1




      1










      asked Mar 28 at 18:28









      Vishnu RudrasamudramVishnu Rudrasamudram

      377 bronze badges




      377 bronze badges

























          3 Answers
          3






          active

          oldest

          votes


















          2
















          Consider also: you may slightly re-arrange your code without adding lines.



          class Planner

          private:
          typedef std::pair<int, int> location;
          std::vector<location> obstacles;
          // "next_state" private method moved below

          public:
          Planner(/* args */);
          virtual ~Planner();

          /* data */
          struct Command

          unsigned char direction;
          unsigned char steering;
          ;

          struct Pose

          int x;
          int y;
          int theta;
          ;

          struct Node

          Pose pose;
          int f;
          int g;
          int h;
          ;

          private:
          Pose next_state(const Pose& current_state, const Command& command);

          ;


          You may have more than one private section.



          Also, you might consider moving all the private attributes together at the end of class declaration.






          share|improve this answer



























          • Of course, the other way round re-arranging instead of forward declarations works as well. Good alternative.

            – πάντα ῥεῖ
            Mar 28 at 19:39



















          4

















          Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.




          That's because you introduced Pose and Command type references before the compiler could see them in the private section:



          private:
          // ...
          Pose next_state(const Pose& current_state, const Command& command);
          // ^^^^ ^^^^^^^


          The compiler needs to see identifiers before their usage.




          The way to solve that is you need properly ordered forward declarations within your Planner class:



          class Planner 
          // <region> The following stuff in the public access section,
          // otherwise an error about "redeclared with different access" will occur.
          public:
          struct Pose;
          struct Command;
          // </region>

          private:
          typedef std::pair<int, int> location;
          std::vector<location> obstacles;
          Pose next_state(const Pose& current_state, const Command& command);

          public:
          Planner(/* args */);
          virtual ~Planner();

          /* data */
          struct Command
          unsigned char direction;
          unsigned char steering;
          ;

          struct Pose
          int x;
          int y;
          int theta;
          ;

          struct Node
          Pose pose;
          int f;
          int g;
          int h;
          ;
          ;


          See the working code.



          The alternative is to rearrange your public and private sections1 as mentioned in @2785528's answer.




          1)Note these can be provided multipe times within a class declaration.






          share|improve this answer


































            0
















            Files are parsed in order. You are referencing Pose before you are defining it. You can do this with member functions and variables but those are the exception not the rule.



            An easy way to solve this in your case is to move the private section to the end.






            share|improve this answer






















            • 2





              Sidenote: Function definitions inside the class can side-step the ordering and use members declared later in the class.

              – user4581301
              Mar 28 at 18:34






            • 1





              @user4581301 I guess I did not understand your comment. What make this answer be erroneous?

              – Amadeus
              Mar 28 at 18:45







            • 1





              Puzzled by that myself. Too simple? Forward declarations are more ideologically correct? No clue. I just wanted to point out that there was an exception to the Everything is processed in order, because most of the time what you said is correct.

              – user4581301
              Mar 28 at 18:49






            • 1





              The first version of this answer was bad (-1). Current version is mediocre, but we actually don't need it because we now have good answers.

              – anatolyg
              Mar 28 at 19:39












            • @anatolyg: Neither of the other answers even attempt to explain what is wrong.

              – Jack Aidley
              Mar 28 at 19:46













            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );














            draft saved

            draft discarded
















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55404581%2faccess-public-struct-defined-inside-a-class%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2
















            Consider also: you may slightly re-arrange your code without adding lines.



            class Planner

            private:
            typedef std::pair<int, int> location;
            std::vector<location> obstacles;
            // "next_state" private method moved below

            public:
            Planner(/* args */);
            virtual ~Planner();

            /* data */
            struct Command

            unsigned char direction;
            unsigned char steering;
            ;

            struct Pose

            int x;
            int y;
            int theta;
            ;

            struct Node

            Pose pose;
            int f;
            int g;
            int h;
            ;

            private:
            Pose next_state(const Pose& current_state, const Command& command);

            ;


            You may have more than one private section.



            Also, you might consider moving all the private attributes together at the end of class declaration.






            share|improve this answer



























            • Of course, the other way round re-arranging instead of forward declarations works as well. Good alternative.

              – πάντα ῥεῖ
              Mar 28 at 19:39
















            2
















            Consider also: you may slightly re-arrange your code without adding lines.



            class Planner

            private:
            typedef std::pair<int, int> location;
            std::vector<location> obstacles;
            // "next_state" private method moved below

            public:
            Planner(/* args */);
            virtual ~Planner();

            /* data */
            struct Command

            unsigned char direction;
            unsigned char steering;
            ;

            struct Pose

            int x;
            int y;
            int theta;
            ;

            struct Node

            Pose pose;
            int f;
            int g;
            int h;
            ;

            private:
            Pose next_state(const Pose& current_state, const Command& command);

            ;


            You may have more than one private section.



            Also, you might consider moving all the private attributes together at the end of class declaration.






            share|improve this answer



























            • Of course, the other way round re-arranging instead of forward declarations works as well. Good alternative.

              – πάντα ῥεῖ
              Mar 28 at 19:39














            2














            2










            2









            Consider also: you may slightly re-arrange your code without adding lines.



            class Planner

            private:
            typedef std::pair<int, int> location;
            std::vector<location> obstacles;
            // "next_state" private method moved below

            public:
            Planner(/* args */);
            virtual ~Planner();

            /* data */
            struct Command

            unsigned char direction;
            unsigned char steering;
            ;

            struct Pose

            int x;
            int y;
            int theta;
            ;

            struct Node

            Pose pose;
            int f;
            int g;
            int h;
            ;

            private:
            Pose next_state(const Pose& current_state, const Command& command);

            ;


            You may have more than one private section.



            Also, you might consider moving all the private attributes together at the end of class declaration.






            share|improve this answer















            Consider also: you may slightly re-arrange your code without adding lines.



            class Planner

            private:
            typedef std::pair<int, int> location;
            std::vector<location> obstacles;
            // "next_state" private method moved below

            public:
            Planner(/* args */);
            virtual ~Planner();

            /* data */
            struct Command

            unsigned char direction;
            unsigned char steering;
            ;

            struct Pose

            int x;
            int y;
            int theta;
            ;

            struct Node

            Pose pose;
            int f;
            int g;
            int h;
            ;

            private:
            Pose next_state(const Pose& current_state, const Command& command);

            ;


            You may have more than one private section.



            Also, you might consider moving all the private attributes together at the end of class declaration.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Mar 28 at 19:40









            anatolyg

            18k4 gold badges47 silver badges97 bronze badges




            18k4 gold badges47 silver badges97 bronze badges










            answered Mar 28 at 19:07









            27855282785528

            4,7092 gold badges12 silver badges17 bronze badges




            4,7092 gold badges12 silver badges17 bronze badges















            • Of course, the other way round re-arranging instead of forward declarations works as well. Good alternative.

              – πάντα ῥεῖ
              Mar 28 at 19:39


















            • Of course, the other way round re-arranging instead of forward declarations works as well. Good alternative.

              – πάντα ῥεῖ
              Mar 28 at 19:39

















            Of course, the other way round re-arranging instead of forward declarations works as well. Good alternative.

            – πάντα ῥεῖ
            Mar 28 at 19:39






            Of course, the other way round re-arranging instead of forward declarations works as well. Good alternative.

            – πάντα ῥεῖ
            Mar 28 at 19:39














            4

















            Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.




            That's because you introduced Pose and Command type references before the compiler could see them in the private section:



            private:
            // ...
            Pose next_state(const Pose& current_state, const Command& command);
            // ^^^^ ^^^^^^^


            The compiler needs to see identifiers before their usage.




            The way to solve that is you need properly ordered forward declarations within your Planner class:



            class Planner 
            // <region> The following stuff in the public access section,
            // otherwise an error about "redeclared with different access" will occur.
            public:
            struct Pose;
            struct Command;
            // </region>

            private:
            typedef std::pair<int, int> location;
            std::vector<location> obstacles;
            Pose next_state(const Pose& current_state, const Command& command);

            public:
            Planner(/* args */);
            virtual ~Planner();

            /* data */
            struct Command
            unsigned char direction;
            unsigned char steering;
            ;

            struct Pose
            int x;
            int y;
            int theta;
            ;

            struct Node
            Pose pose;
            int f;
            int g;
            int h;
            ;
            ;


            See the working code.



            The alternative is to rearrange your public and private sections1 as mentioned in @2785528's answer.




            1)Note these can be provided multipe times within a class declaration.






            share|improve this answer































              4

















              Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.




              That's because you introduced Pose and Command type references before the compiler could see them in the private section:



              private:
              // ...
              Pose next_state(const Pose& current_state, const Command& command);
              // ^^^^ ^^^^^^^


              The compiler needs to see identifiers before their usage.




              The way to solve that is you need properly ordered forward declarations within your Planner class:



              class Planner 
              // <region> The following stuff in the public access section,
              // otherwise an error about "redeclared with different access" will occur.
              public:
              struct Pose;
              struct Command;
              // </region>

              private:
              typedef std::pair<int, int> location;
              std::vector<location> obstacles;
              Pose next_state(const Pose& current_state, const Command& command);

              public:
              Planner(/* args */);
              virtual ~Planner();

              /* data */
              struct Command
              unsigned char direction;
              unsigned char steering;
              ;

              struct Pose
              int x;
              int y;
              int theta;
              ;

              struct Node
              Pose pose;
              int f;
              int g;
              int h;
              ;
              ;


              See the working code.



              The alternative is to rearrange your public and private sections1 as mentioned in @2785528's answer.




              1)Note these can be provided multipe times within a class declaration.






              share|improve this answer





























                4














                4










                4










                Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.




                That's because you introduced Pose and Command type references before the compiler could see them in the private section:



                private:
                // ...
                Pose next_state(const Pose& current_state, const Command& command);
                // ^^^^ ^^^^^^^


                The compiler needs to see identifiers before their usage.




                The way to solve that is you need properly ordered forward declarations within your Planner class:



                class Planner 
                // <region> The following stuff in the public access section,
                // otherwise an error about "redeclared with different access" will occur.
                public:
                struct Pose;
                struct Command;
                // </region>

                private:
                typedef std::pair<int, int> location;
                std::vector<location> obstacles;
                Pose next_state(const Pose& current_state, const Command& command);

                public:
                Planner(/* args */);
                virtual ~Planner();

                /* data */
                struct Command
                unsigned char direction;
                unsigned char steering;
                ;

                struct Pose
                int x;
                int y;
                int theta;
                ;

                struct Node
                Pose pose;
                int f;
                int g;
                int h;
                ;
                ;


                See the working code.



                The alternative is to rearrange your public and private sections1 as mentioned in @2785528's answer.




                1)Note these can be provided multipe times within a class declaration.






                share|improve this answer
















                Here, it says 'identifier "Pose" is undefined'. I would like to understand what is going on here.




                That's because you introduced Pose and Command type references before the compiler could see them in the private section:



                private:
                // ...
                Pose next_state(const Pose& current_state, const Command& command);
                // ^^^^ ^^^^^^^


                The compiler needs to see identifiers before their usage.




                The way to solve that is you need properly ordered forward declarations within your Planner class:



                class Planner 
                // <region> The following stuff in the public access section,
                // otherwise an error about "redeclared with different access" will occur.
                public:
                struct Pose;
                struct Command;
                // </region>

                private:
                typedef std::pair<int, int> location;
                std::vector<location> obstacles;
                Pose next_state(const Pose& current_state, const Command& command);

                public:
                Planner(/* args */);
                virtual ~Planner();

                /* data */
                struct Command
                unsigned char direction;
                unsigned char steering;
                ;

                struct Pose
                int x;
                int y;
                int theta;
                ;

                struct Node
                Pose pose;
                int f;
                int g;
                int h;
                ;
                ;


                See the working code.



                The alternative is to rearrange your public and private sections1 as mentioned in @2785528's answer.




                1)Note these can be provided multipe times within a class declaration.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 28 at 19:51

























                answered Mar 28 at 18:44









                πάντα ῥεῖπάντα ῥεῖ

                1




                1
























                    0
















                    Files are parsed in order. You are referencing Pose before you are defining it. You can do this with member functions and variables but those are the exception not the rule.



                    An easy way to solve this in your case is to move the private section to the end.






                    share|improve this answer






















                    • 2





                      Sidenote: Function definitions inside the class can side-step the ordering and use members declared later in the class.

                      – user4581301
                      Mar 28 at 18:34






                    • 1





                      @user4581301 I guess I did not understand your comment. What make this answer be erroneous?

                      – Amadeus
                      Mar 28 at 18:45







                    • 1





                      Puzzled by that myself. Too simple? Forward declarations are more ideologically correct? No clue. I just wanted to point out that there was an exception to the Everything is processed in order, because most of the time what you said is correct.

                      – user4581301
                      Mar 28 at 18:49






                    • 1





                      The first version of this answer was bad (-1). Current version is mediocre, but we actually don't need it because we now have good answers.

                      – anatolyg
                      Mar 28 at 19:39












                    • @anatolyg: Neither of the other answers even attempt to explain what is wrong.

                      – Jack Aidley
                      Mar 28 at 19:46















                    0
















                    Files are parsed in order. You are referencing Pose before you are defining it. You can do this with member functions and variables but those are the exception not the rule.



                    An easy way to solve this in your case is to move the private section to the end.






                    share|improve this answer






















                    • 2





                      Sidenote: Function definitions inside the class can side-step the ordering and use members declared later in the class.

                      – user4581301
                      Mar 28 at 18:34






                    • 1





                      @user4581301 I guess I did not understand your comment. What make this answer be erroneous?

                      – Amadeus
                      Mar 28 at 18:45







                    • 1





                      Puzzled by that myself. Too simple? Forward declarations are more ideologically correct? No clue. I just wanted to point out that there was an exception to the Everything is processed in order, because most of the time what you said is correct.

                      – user4581301
                      Mar 28 at 18:49






                    • 1





                      The first version of this answer was bad (-1). Current version is mediocre, but we actually don't need it because we now have good answers.

                      – anatolyg
                      Mar 28 at 19:39












                    • @anatolyg: Neither of the other answers even attempt to explain what is wrong.

                      – Jack Aidley
                      Mar 28 at 19:46













                    0














                    0










                    0









                    Files are parsed in order. You are referencing Pose before you are defining it. You can do this with member functions and variables but those are the exception not the rule.



                    An easy way to solve this in your case is to move the private section to the end.






                    share|improve this answer















                    Files are parsed in order. You are referencing Pose before you are defining it. You can do this with member functions and variables but those are the exception not the rule.



                    An easy way to solve this in your case is to move the private section to the end.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 28 at 19:01

























                    answered Mar 28 at 18:31









                    Jack AidleyJack Aidley

                    13.1k6 gold badges31 silver badges63 bronze badges




                    13.1k6 gold badges31 silver badges63 bronze badges










                    • 2





                      Sidenote: Function definitions inside the class can side-step the ordering and use members declared later in the class.

                      – user4581301
                      Mar 28 at 18:34






                    • 1





                      @user4581301 I guess I did not understand your comment. What make this answer be erroneous?

                      – Amadeus
                      Mar 28 at 18:45







                    • 1





                      Puzzled by that myself. Too simple? Forward declarations are more ideologically correct? No clue. I just wanted to point out that there was an exception to the Everything is processed in order, because most of the time what you said is correct.

                      – user4581301
                      Mar 28 at 18:49






                    • 1





                      The first version of this answer was bad (-1). Current version is mediocre, but we actually don't need it because we now have good answers.

                      – anatolyg
                      Mar 28 at 19:39












                    • @anatolyg: Neither of the other answers even attempt to explain what is wrong.

                      – Jack Aidley
                      Mar 28 at 19:46












                    • 2





                      Sidenote: Function definitions inside the class can side-step the ordering and use members declared later in the class.

                      – user4581301
                      Mar 28 at 18:34






                    • 1





                      @user4581301 I guess I did not understand your comment. What make this answer be erroneous?

                      – Amadeus
                      Mar 28 at 18:45







                    • 1





                      Puzzled by that myself. Too simple? Forward declarations are more ideologically correct? No clue. I just wanted to point out that there was an exception to the Everything is processed in order, because most of the time what you said is correct.

                      – user4581301
                      Mar 28 at 18:49






                    • 1





                      The first version of this answer was bad (-1). Current version is mediocre, but we actually don't need it because we now have good answers.

                      – anatolyg
                      Mar 28 at 19:39












                    • @anatolyg: Neither of the other answers even attempt to explain what is wrong.

                      – Jack Aidley
                      Mar 28 at 19:46







                    2




                    2





                    Sidenote: Function definitions inside the class can side-step the ordering and use members declared later in the class.

                    – user4581301
                    Mar 28 at 18:34





                    Sidenote: Function definitions inside the class can side-step the ordering and use members declared later in the class.

                    – user4581301
                    Mar 28 at 18:34




                    1




                    1





                    @user4581301 I guess I did not understand your comment. What make this answer be erroneous?

                    – Amadeus
                    Mar 28 at 18:45






                    @user4581301 I guess I did not understand your comment. What make this answer be erroneous?

                    – Amadeus
                    Mar 28 at 18:45





                    1




                    1





                    Puzzled by that myself. Too simple? Forward declarations are more ideologically correct? No clue. I just wanted to point out that there was an exception to the Everything is processed in order, because most of the time what you said is correct.

                    – user4581301
                    Mar 28 at 18:49





                    Puzzled by that myself. Too simple? Forward declarations are more ideologically correct? No clue. I just wanted to point out that there was an exception to the Everything is processed in order, because most of the time what you said is correct.

                    – user4581301
                    Mar 28 at 18:49




                    1




                    1





                    The first version of this answer was bad (-1). Current version is mediocre, but we actually don't need it because we now have good answers.

                    – anatolyg
                    Mar 28 at 19:39






                    The first version of this answer was bad (-1). Current version is mediocre, but we actually don't need it because we now have good answers.

                    – anatolyg
                    Mar 28 at 19:39














                    @anatolyg: Neither of the other answers even attempt to explain what is wrong.

                    – Jack Aidley
                    Mar 28 at 19:46





                    @anatolyg: Neither of the other answers even attempt to explain what is wrong.

                    – Jack Aidley
                    Mar 28 at 19:46


















                    draft saved

                    draft discarded















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55404581%2faccess-public-struct-defined-inside-a-class%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

                    Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

                    Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript