Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: In different LAN Client know each Extranet IP and Port can they success connect? Pin
Randor 21-Oct-09 22:13
professional Randor 21-Oct-09 22:13 
GeneralRe: In different LAN Client know each Extranet IP and Port can they success connect? Pin
Rajesh R Subramanian21-Oct-09 22:44
professionalRajesh R Subramanian21-Oct-09 22:44 
GeneralRe: In different LAN Client know each Extranet IP and Port can they success connect? Pin
jeansea22-Oct-09 17:25
jeansea22-Oct-09 17:25 
GeneralRe: In different LAN Client know each Extranet IP and Port can they success connect? Pin
Randor 22-Oct-09 17:42
professional Randor 22-Oct-09 17:42 
GeneralRe: In different LAN Client know each Extranet IP and Port can they success connect? Pin
jeansea22-Oct-09 20:06
jeansea22-Oct-09 20:06 
QuestionHow to implement WndProc callback method in a windows service ? Pin
Kushagra Tiwari21-Oct-09 21:56
Kushagra Tiwari21-Oct-09 21:56 
QuestionRe: How to implement WndProc callback method in a windows service ? Pin
Adam Roderick J21-Oct-09 22:00
Adam Roderick J21-Oct-09 22:00 
AnswerRe: How to implement WndProc callback method in a windows service ? Pin
Kushagra Tiwari21-Oct-09 22:08
Kushagra Tiwari21-Oct-09 22:08 
GeneralRe: How to implement WndProc callback method in a windows service ? Pin
Adam Roderick J21-Oct-09 23:32
Adam Roderick J21-Oct-09 23:32 
GeneralRe: How to implement WndProc callback method in a windows service ? Pin
Iain Clarke, Warrior Programmer21-Oct-09 23:34
Iain Clarke, Warrior Programmer21-Oct-09 23:34 
GeneralRe: How to implement WndProc callback method in a windows service ? Pin
Kushagra Tiwari22-Oct-09 0:35
Kushagra Tiwari22-Oct-09 0:35 
Questioncan i store output from readdir() function in an array Pin
WindowsVsLinux21-Oct-09 21:23
WindowsVsLinux21-Oct-09 21:23 
AnswerRe: can i store output from readdir() function in an array Pin
«_Superman_»21-Oct-09 21:30
professional«_Superman_»21-Oct-09 21:30 
GeneralRe: can i store output from readdir() function in an array Pin
WindowsVsLinux21-Oct-09 21:43
WindowsVsLinux21-Oct-09 21:43 
GeneralRe: can i store output from readdir() function in an array Pin
Cedric Moonen21-Oct-09 21:57
Cedric Moonen21-Oct-09 21:57 
GeneralRe: can i store output from readdir() function in an array Pin
WindowsVsLinux21-Oct-09 22:05
WindowsVsLinux21-Oct-09 22:05 
GeneralRe: can i store output from readdir() function in an array Pin
Cedric Moonen21-Oct-09 22:14
Cedric Moonen21-Oct-09 22:14 
GeneralRe: can i store output from readdir() function in an array Pin
WindowsVsLinux21-Oct-09 22:18
WindowsVsLinux21-Oct-09 22:18 
GeneralRe: can i store output from readdir() function in an array Pin
Michael Schubert21-Oct-09 22:56
Michael Schubert21-Oct-09 22:56 
GeneralRe: can i store output from readdir() function in an array Pin
David Crow22-Oct-09 3:21
David Crow22-Oct-09 3:21 
QuestionType Promotion in C Pin
__yash__21-Oct-09 20:36
professional__yash__21-Oct-09 20:36 
unsigned long i; //4-bytes, int: 4-bytes
short s;              //2-bytes
signed char c;        //1-byte

i = (s<<15) + (c <<9);


How will type conversion take place in this case?

Is it that:
1. s will remain short(2 bytes) thus shifting the LSB into the MSB and remaining bits turn 0; c is promoted to short then left-shift 9 performed. The final R-value is promoted to unsigned long and saved into i.

or

2. s and c both get converted to unsigned long before performing the shift operation (thus we do not lose any of the left-shifted bits)

or something else happens.

I tried it in VS6.0 and the result seem to indicate that in both s and c I did not lose any bit upon left-shifting as if s and c acted as if they were a 4-byte data type (long or int)
AnswerRe: Type Promotion in C Pin
«_Superman_»21-Oct-09 21:28
professional«_Superman_»21-Oct-09 21:28 
GeneralRe: Type Promotion in C Pin
__yash__21-Oct-09 21:36
professional__yash__21-Oct-09 21:36 
QuestionRe: Type Promotion in C Pin
CPallini21-Oct-09 21:39
mveCPallini21-Oct-09 21:39 
AnswerRe: Type Promotion in C Pin
__yash__21-Oct-09 21:50
professional__yash__21-Oct-09 21:50 

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.