C++C++运算符优先级 案例1

问:

              …

              short nReaderCount=10
              ++pLock->nReaderCount==?

              …

++和->同为1级优先级,我怀念多吗有许多新手弄不亮这事例先实施  
++    操作,还是事先实施之  ->   操作

自己好写个了短程序:

              #include<iostream>
              using namespace std;
             

              class test
              {
              public:
                  short nReaderCount;
              };

              int main()
              {
                  test *test1=new test;
                  test1->nReaderCount=10;
    
                  cout<<    ++test1->nReaderCount  
 <<endl;
                
 cout<<“结果表明:先实施指针操作,再履行于添操作”;

              return 0;
              }

 

 

追问:如果test是union
那么结果同时是啊?