logo
  • 教程列表
  • SO官方文檔
  • 約束
    • 在同一範圍內重複變數名稱
    • 一元算術運算子
  1. StackOverflow 文件
  2. C Language 教程
  3. 約束
  4. 一元算術運算子

一元算術運算子

Created: November-22, 2018

一元+和 - 運算子僅可用於算術型別,因此,例如,如果嘗試在結構上使用它們,程式將生成診斷,例如:

struct foo
{
    bool bar;
};

void baz(void)
{
   struct foo testStruct;
   -testStruct; /* This breaks the constraint so must produce a diagnostic */
}
  • 在同一範圍內重複變數名稱

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明