I have this in my .hpp file:
class MD
{
public:
    static const开发者_运维知识库 int Blk = 0;
}
And this in a method in .mm file that includes the .hpp file:
int i = MD.Blk;
the compiler says error: expected primary-expression before '.' token on this line.
Try the :: operator
int i = MD::Blk;
The correct way to refer static class member variables is using the :: operator, like this:
int i = MD::Blk;
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论