【发布时间】:2012-10-26 15:22:22
【问题描述】:
我在给定位置放置 1 位时遇到问题。 例如,如果 int e 为 1,我将 neset_t* ne 中的第一位设为 1。
到目前为止我已经这样做了,但没有用。
typedef unsigned short int neset_t;
void add(neset_t* ne,int e){
int num = (int) *ne;
num = num | e;
*ne = (neset_t) num;
}
提前致谢。 对不起我的英语。
【问题讨论】: