Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionAcceptEx and WSARecv question in IOCP Pin
followait25-May-06 19:01
followait25-May-06 19:01 
AnswerRe: AcceptEx and WSARecv question in IOCP Pin
valikac25-May-06 20:02
valikac25-May-06 20:02 
GeneralRe: AcceptEx and WSARecv question in IOCP Pin
followait25-May-06 21:11
followait25-May-06 21:11 
GeneralRe: AcceptEx and WSARecv question in IOCP Pin
valikac26-May-06 7:02
valikac26-May-06 7:02 
GeneralRe: AcceptEx and WSARecv question in IOCP Pin
followait26-May-06 12:00
followait26-May-06 12:00 
GeneralRe: AcceptEx and WSARecv question in IOCP Pin
valikac26-May-06 12:11
valikac26-May-06 12:11 
GeneralRe: AcceptEx and WSARecv question in IOCP Pin
followait26-May-06 23:10
followait26-May-06 23:10 
GeneralRe: AcceptEx and WSARecv question in IOCP Pin
valikac27-May-06 18:47
valikac27-May-06 18:47 
GeneralRe: AcceptEx and WSARecv question in IOCP Pin
followait27-May-06 20:25
followait27-May-06 20:25 
QuestionType Conversion Pin
satsumatable25-May-06 18:56
satsumatable25-May-06 18:56 
AnswerRe: Type Conversion [modified] Pin
Stephen Hewitt25-May-06 21:27
Stephen Hewitt25-May-06 21:27 
GeneralRe: Type Conversion [modified] Pin
satsumatable26-May-06 17:01
satsumatable26-May-06 17:01 
GeneralRe: Type Conversion [modified] Pin
Stephen Hewitt26-May-06 17:46
Stephen Hewitt26-May-06 17:46 
Questionswap Red and Blue in GDI+ Pin
ilidan25-May-06 18:45
ilidan25-May-06 18:45 
AnswerRe: swap Red and Blue in GDI+ Pin
_anil_25-May-06 19:37
_anil_25-May-06 19:37 
GeneralRe: swap Red and Blue in GDI+ Pin
ilidan25-May-06 19:50
ilidan25-May-06 19:50 
GeneralRe: swap Red and Blue in GDI+ Pin
_anil_25-May-06 20:01
_anil_25-May-06 20:01 
GeneralRe: swap Red and Blue in GDI+ Pin
ilidan25-May-06 20:14
ilidan25-May-06 20:14 
Questionpointer [modified] Pin
jith - iii25-May-06 18:45
jith - iii25-May-06 18:45 
AnswerRe: pointer Pin
PJ Arends25-May-06 18:59
professionalPJ Arends25-May-06 18:59 
AnswerRe: pointer Pin
S. Senthil Kumar25-May-06 19:04
S. Senthil Kumar25-May-06 19:04 
GeneralRe: pointer Pin
jith - iii25-May-06 19:22
jith - iii25-May-06 19:22 
GeneralRe: pointer Pin
S. Senthil Kumar25-May-06 19:52
S. Senthil Kumar25-May-06 19:52 
jithAtran - ii wrote:
the address of p is 1000/1001 and how it store the addresses 2000/2001 in bit format considering 1000 will hold 4 bits and 1001 will also hold 4 bits

Like I said in my previous post, the size of a pointer is dependent on the platform. And address is different from the size of a variable. On Win32, a pointer is 4 bytes. If the address of p is 1000, then bytes 1000, 1001, 1002 and 1003 will be available for p. 4 bytes is equal to 32 bits and 232 is the maximum address value you can point at.

Taking your example, assuming a 16 bit environment, then the address of p will be 1000 and it will have two bytes allocated to it, 1000 and 1001. A byte is 8 bits, so 1000 can store 8 bits and 1001 can store 8 bits, for a total of 16 bits. For storing 2000, depending on the endianness, the compiler might do
<pre>
_________________
__00___|___7D_____
1000        1001
</pre>
7D is 2000 expressed in hex.

Does this answer your question?


Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: pointer [modified] Pin
jith - iii25-May-06 21:09
jith - iii25-May-06 21:09 
GeneralRe: pointer Pin
S. Senthil Kumar25-May-06 22:59
S. Senthil Kumar25-May-06 22:59 

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.