摘要: switch(变量)语句变量是有严格控制的,如string类型和float类型编译就会报错,它支持char, int, short, long等等(仅限于C和C++中,在C#中则可以通过)另外对于switch语句中的返回值不同的语言也有不同的限制,如C++语言和C#语言,看下面两段代码#include<iostream>#include<string>using namespace std;class pro{ private: int numberA; int numberB; public: pro(int A,int B) ... 阅读全文
posted @ 2012-09-13 19:36 射手炎魂 阅读(1946) 评论(0) 推荐(0) 编辑