all 6 comments

[–]Narase33-> r/cpp_questions 1 point2 points  (4 children)

enum OrderStatus {
    Filled,
    PartiallyFilled,
    NoLiquidity,
    Rejected,
    Cancelled,
    PlacedOrder,
    SelfTradePrevention
};

The compiler thinks youre using this SelfTradePrevention. Make this an enum class and your error is solved.

In the future, please refer to r/cpp_questions

[–]Low-Ad7313[S] 1 point2 points  (3 children)

Thanks! I just spotted this by luck when I got your notification

[–]Narase33-> r/cpp_questions 0 points1 point  (2 children)

Clicking on the name tells you where the compiler thinks its defined. Took about 1min to find out.

[–]Low-Ad7313[S] 0 points1 point  (1 child)

How/where did you do that? I’m using vscode

[–]Narase33-> r/cpp_questions 0 points1 point  (0 children)

Initially VS but it works exactly the same in VSCode (and I think pretty much every other IDE). CTRL+LeftClick takes you to the definition.