移位运算符

amartapple 2002-11-30 05:44:40
我再bcb的帮助中查到了以下运算符
Operator Operation Operand types Result type Examples
not bitwise negation integer integer not X
and bitwise and integer integer X and Y
or bitwise or integer integer X or Y
xor bitwise xor integer integer X xor Y
shl bitwise shift left integer integer X shl 2
shr bitwise shift right integer integer Y shr I
试了最后一个,竟然编译出错,请问该怎么使用呀
...全文
62 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
myy 2002-11-30
  • 打赏
  • 举报
回复
not = ~
and =&
or =|
xor =^
shl =<<
shr =>>
cdws222 2002-11-30
  • 打赏
  • 举报
回复
这是DELPHI中的东东,
在C/C++中只有& >> << ! |等

13,825

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder相关内容讨论区
社区管理员
  • 基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧