Home>

I can compile, but Intellisense gives a lot of errors. Immediately after rewriting, the error disappears, but if you leave it for about 10 seconds, a lot of red lines will be drawn.
When I wrote a little test class to test where the error judgment was made, for some reason I stopped throwing any errors.

There were multiple errors, but it seems that ... is not the name of the class or struct, and that the default constructor doesn't exist (I think it was), and the other errors were due to it. ..
The place where the error occurred was as follows.

Header

class Test
{
    class A {
    public:
        A (int i);
    };
    class B: public A {// A here is not the name of the class or struct
        B (int i);
    };
    class C: public A {// A here is not the name of the class or struct
        C (int i);
    };
};

Source

#include "Test.h"
Test :: A :: A (int i) {}
Test :: B :: B (int i): A (i) {} // B here There is no default constructor (I think it was)
Test :: C :: C (int i): A (i) {}

I don't know if it will occur in the future, but I'm afraid that an error will occur and the error will disappear, so I'd like to ask for information.

  • Answer # 1

    Since intellisense and compiler are different dimensions, there may be discrepancies.

  • Answer # 2

    It's not just that it takes time to analyze the grammar of intellisense

  • Answer # 3

    The most common is the wrong number of parentheses.
    I have had trouble with it for about 2 hours.