Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in posts by zhaobey only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
zhaobey
User Profile
Collapse
Profile Sidebar
Collapse
zhaobey
Last Activity: Nov 1 '08, 07:32 AM
Joined: Nov 1 '08
Location:
Subscriptions
1
Subscribers
0
Activities
About
Media
Subscribed
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Source
All
zhaobey only
Visitor Messages Only
Advanced
Filtered by:
Clear All
new posts
zhaobey
replied to
How to check bit fields order.
in
C
Nov 1 '08, 07:31 AM
#include<iostre am>
using namespace std;
union Foo
{
int i;
char c;
};
int main()
{
Foo foo;
foo.i=1;
if(foo.c==1)
cout<<"little_e ndian"<<endl;
else
cout<<"bigger_e ndain"<<endl;
}
See more
|
Go to post
Leave a comment:
Post Comment
Cancel
No activity results to display
Show More
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Leave a comment: