Problems with #define - expected expression before “=” token

后端 未结 1 1270
Happy的楠姐
Happy的楠姐 2021-01-17 10:48

Beginner\'s question: I dared to introduce constants into my little program. I first resisted, but then I thought I should give it a try... to see that it doesn\'t work.

1条回答
  •  难免孤独
    2021-01-17 11:03

    You don't need = in an #define or the semicolon afterwards. Just use

    #define kPageCurlSpeed  2.5
    

    Read e.g. this wikipedia article on C preprocessor.

    0 讨论(0)
提交回复
热议问题