[求助]为什么编译出错呢?是不是还要什么头文件呢?
请指点:为什么编译出错呢?是不是还要什么头文件呢?#include <iostream>
using namespace std;
unsigned char rol(unsigned char val)//这是实现左旋的函数
{
int highbit;
if(val & 0x80)
highbit=1;
else
highbit=0;
val<<=1;
val|=highbit;
return val;
}
unsigned char ror(unsigned char val)//这是实现右旋的函数
{
int lowbit;
if(val & 1)
lowbit=1;
else
lowbit=0;
val>>=1;
val |=(lowbit << 7)
return val;
}
int main()
{
unsigned char c,ch,f,g;
c='a';
ch='b';
f=unsigned char rol(c);
g=unsigned char ror(b);
std::cin.get();
return 0;
}