Click here to Skip to main content
15,915,702 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to create client and server winsock in one project or use 2 winsock in one project? Pin
zhiyuan1625-Sep-10 23:57
zhiyuan1625-Sep-10 23:57 
GeneralRe: how to create client and server winsock in one project or use 2 winsock in one project? Pin
Moak26-Sep-10 0:59
Moak26-Sep-10 0:59 
GeneralRe: how to create client and server winsock in one project or use 2 winsock in one project? Pin
Richard MacCutchan26-Sep-10 1:04
mveRichard MacCutchan26-Sep-10 1:04 
QuestionMemory aligned bit fields Pin
Trevor Johansen24-Sep-10 21:34
Trevor Johansen24-Sep-10 21:34 
AnswerRe: Memory aligned bit fields Pin
Luc Pattyn24-Sep-10 23:02
sitebuilderLuc Pattyn24-Sep-10 23:02 
AnswerRe: Memory aligned bit fields Pin
Alain Rist24-Sep-10 23:53
Alain Rist24-Sep-10 23:53 
AnswerRe: Memory aligned bit fields Pin
Aescleal25-Sep-10 0:56
Aescleal25-Sep-10 0:56 
AnswerRe: Memory aligned bit fields Pin
Trevor Johansen25-Sep-10 6:51
Trevor Johansen25-Sep-10 6:51 
Thanks for the replies!

Luc: "you could have a union of both structs, then both ways of accessing bits are available" Could you give me an example of this union of two structures? I'm not sure how it would work as I would think each structure would have a different memory location.

Alain: "std::bitset<size_t>" I did not know of this capability. It is quite close to what I want and will be helpful while in visual studio but my GCC compiler does not have STL support only the standard set of c libraries. I'm going to take a look at how they implemented it and see if I can work with it but have not looked yet.

Aescleal: I have gone through some sites on placement specifically http://en.wikipedia.org/wiki/Placement_syntax[^] and It clearly states it does what I want and places something at a given memory location but nowhere in the examples do I see the new object being assigned to a specific location. Can you give me a breakdown on how you would place a 32bit value at memory location 0x14000000 using placement new?

Any other suggestions? I'm still poking code around unsuccessfully.
AnswerRe: Memory aligned bit fields Pin
Aescleal25-Sep-10 7:26
Aescleal25-Sep-10 7:26 
GeneralRe: Memory aligned bit fields Pin
Trevor Johansen25-Sep-10 8:40
Trevor Johansen25-Sep-10 8:40 
AnswerRe: Memory aligned bit fields Pin
Aescleal25-Sep-10 10:07
Aescleal25-Sep-10 10:07 
GeneralRe: Memory aligned bit fields Pin
Trevor Johansen25-Sep-10 11:15
Trevor Johansen25-Sep-10 11:15 
AnswerRe: Memory aligned bit fields Pin
Luc Pattyn25-Sep-10 8:55
sitebuilderLuc Pattyn25-Sep-10 8:55 
GeneralRe: Memory aligned bit fields Pin
Trevor Johansen25-Sep-10 9:34
Trevor Johansen25-Sep-10 9:34 
GeneralRe: Memory aligned bit fields Pin
Luc Pattyn25-Sep-10 9:45
sitebuilderLuc Pattyn25-Sep-10 9:45 
GeneralRe: Memory aligned bit fields Pin
Trevor Johansen25-Sep-10 10:57
Trevor Johansen25-Sep-10 10:57 
AnswerRe: Memory aligned bit fields Pin
Luc Pattyn25-Sep-10 11:18
sitebuilderLuc Pattyn25-Sep-10 11:18 
GeneralRe: Memory aligned bit fields Pin
Trevor Johansen25-Sep-10 11:56
Trevor Johansen25-Sep-10 11:56 
GeneralRe: Memory aligned bit fields Pin
Luc Pattyn25-Sep-10 12:14
sitebuilderLuc Pattyn25-Sep-10 12:14 
GeneralRe: Memory aligned bit fields Pin
Alain Rist25-Sep-10 9:57
Alain Rist25-Sep-10 9:57 
GeneralRe: Memory aligned bit fields Pin
Aescleal25-Sep-10 10:19
Aescleal25-Sep-10 10:19 
AnswerRe: Memory aligned bit fields Pin
Alain Rist25-Sep-10 11:26
Alain Rist25-Sep-10 11:26 
GeneralRe: Memory aligned bit fields Pin
Aescleal25-Sep-10 22:31
Aescleal25-Sep-10 22:31 
GeneralRe: Memory aligned bit fields Pin
Trevor Johansen25-Sep-10 10:51
Trevor Johansen25-Sep-10 10:51 
GeneralRe: Memory aligned bit fields Pin
Aescleal25-Sep-10 22:34
Aescleal25-Sep-10 22:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.