位运算符优先级 乘除求余>加减>移位运算符(>>, <<)>比较运算>位运算>逻辑运算符 位运算优先级没有比较运算符优先级高。 指针与引用写法 int& a, b; 定义了一个int引用a和int b。至于int& a还是int &a都可以,是不同的风格。 c++字符串分割 用stringsteam完成字符串分割,istringsteam是串流的输入操作,ostringstream是串流的输出操作。 string s = "Hello world"; stringstream ss(s); string word; while (ss >> word) {}