潇's profile老肖的地盘PhotosBlogListsMore Tools Help

Blog


    June 12

    谈论 C语言声明的优先级规则

     

    引用

    C语言声明的优先级规则

    A    声明从它的名字开始读取,然后按照优先级顺序依次读取。

    B    优先级从高到低依次是:

            B1  声明中被括号括起来的部分

            B2  后缀操作符:括号表示这是一个函数,而方括号表示这是一个数组

            B3  前最操作符:星号*表示“指向……的指针”。

    C    如果const和(或)volatile关键字的后面紧跟类型说明符(比如int ,long等),那么它作用于类型说明符,在其他情况下,const和(或)volatile关键字作用于它左边紧邻的指针星号。

    早看到这个就好了,读C的声明相当纠结的……


    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://seanxiaoxiao.spaces.live.com/blog/cns!7677365E5B9342DE!677.trak
    Weblogs that reference this entry
    • None