错误:无效的预处理指令#i是指#if吗?
我正在学习CPP,并在使用CodeBlocks IDLE时遇到此错误。 它不会运行。
#include <iostream>
// using switch statements
using namespace std;
const float fac = 2.54;
float x,in,cm;
char ch = 0;
int main(){
switch (ch) {
case 'i':
in=x;
cm=x/fac;
break;
case 'c':
in = x/fac;
cm =x;
break;
default:
in=cm=0;
break;
}
}