zoukankan      html  css  js  c++  java
  • c 编译异常 switch 之a label can only be part of a statement and a declaration is not a statement

    client.c:996: error: a label can only be part of a statement and a declaration is not a statement

    switch(a){
    case 1:
    ....................
    ....................
    ....................
    break;
    case 2:
    break;
    }
     
    在GCC下编译会出现如下错误:
    error: a label can only be part of a statement and a declaration is not a statement
    但加上如下括号后,就没有错误了,这是为什么?编译器的问题?
    switch(a){
    case 1:

    ....................
    ....................
    ....................

    break;
    case 2:
    break;
    }
    http://zhidao.baidu.com/link?url=fSrpX7VaVXd5-L8c2zj2xVDSbh8bM-5xyO6iyZOYgV30mI_iZlASQmNakmGSC-4gnPO3oG2HzIAvdSVayOTjTa
    http://www.cnblogs.com/radiolover/p/4307453.html 手机定位
    http://www.cnblogs.com/skyme/p/4310550.html 数据挖掘
  • 相关阅读:
    装配线调度
    最长非降子序列
    0-1背包问题
    所有点对的最短路径问题
    矩阵链相乘
    最长公共子序列
    最近点对问题
    寻找多数元素
    寻找第K小元素
    java冒泡排序算法
  • 原文地址:https://www.cnblogs.com/pengkunfan/p/4311613.html
Copyright © 2011-2022 走看看