Click here to Skip to main content
15,917,481 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralIStorage, IStream and folder copying to Clipboard Pin
Nathan_RR28-Oct-03 1:36
Nathan_RR28-Oct-03 1:36 
Generalgetting Bytes as unsigned short Pin
pankajdaga28-Oct-03 1:17
pankajdaga28-Oct-03 1:17 
GeneralRe: getting Bytes as unsigned short Pin
David Crow28-Oct-03 4:27
David Crow28-Oct-03 4:27 
GeneralRe: getting Bytes as unsigned short Pin
pankajdaga28-Oct-03 5:20
pankajdaga28-Oct-03 5:20 
GeneralRe: getting Bytes as unsigned short Pin
David Crow28-Oct-03 5:24
David Crow28-Oct-03 5:24 
GeneralRe: getting Bytes as unsigned short Pin
pankajdaga29-Oct-03 0:37
pankajdaga29-Oct-03 0:37 
GeneralRe: getting Bytes as unsigned short Pin
jhwurmbach28-Oct-03 6:28
jhwurmbach28-Oct-03 6:28 
GeneralRe: getting Bytes as unsigned short Pin
elkarian28-Oct-03 23:58
elkarian28-Oct-03 23:58 
unsign char baseData[4] = {1, 2, 3, 4};<br />
<br />
unsigned short myVal1 = *(unsigned short *)(baseData + 1);<br />
unsigned short myVal2 = *(unsigned short *)(baseData + 2);


for little endian system:

myVal1 = baseData[1] + baseData[2] * 256,
myVal2 = baseData[2] + baseData[3] * 256

for big endian system:

myVal1 = baseData[1] * 256 + baseData[2],
myVal2 = baseData[2] * 256 + baseData[3]


For some systems, such accesses would cause problems: data alignment violation or resulting unpredictable values Dead | X|



elkarian@hanmail.net
QuestionBitmap Manipulation Intel-Optimized ? Pin
Koep28-Oct-03 1:08
Koep28-Oct-03 1:08 
QuestionHow to get system date and time in c and how to save it? Pin
samhita28-Oct-03 0:56
samhita28-Oct-03 0:56 
AnswerRe: How to get system date and time in c and how to save it? Pin
Ravi Bhavnani28-Oct-03 1:14
professionalRavi Bhavnani28-Oct-03 1:14 
GeneralSoap Tookit 2.0 and Soap_Core.msm Pin
Braulio Dez28-Oct-03 0:30
Braulio Dez28-Oct-03 0:30 
Generalprogramming UART in Visual C++... Pin
Suhail Yousaf27-Oct-03 23:57
Suhail Yousaf27-Oct-03 23:57 
GeneralRe: programming UART in Visual C++... Pin
Mike Dimmick28-Oct-03 1:40
Mike Dimmick28-Oct-03 1:40 
GeneralFocus / Not Focused Pin
YaronNir27-Oct-03 23:12
YaronNir27-Oct-03 23:12 
GeneralRe: Focus / Not Focused Pin
Mumiozol28-Oct-03 0:03
Mumiozol28-Oct-03 0:03 
GeneralRe: Focus / Not Focused Pin
YaronNir28-Oct-03 1:05
YaronNir28-Oct-03 1:05 
GeneralRe: Focus / Not Focused Pin
Mumiozol28-Oct-03 1:42
Mumiozol28-Oct-03 1:42 
GeneralRe: Focus / Not Focused Pin
YaronNir28-Oct-03 1:43
YaronNir28-Oct-03 1:43 
Generalsome doubts about PeekMessage Pin
winewind27-Oct-03 22:05
winewind27-Oct-03 22:05 
GeneralRe: some doubts about PeekMessage Pin
yndfcd28-Oct-03 0:08
yndfcd28-Oct-03 0:08 
GeneralRe: some doubts about PeekMessage Pin
winewind28-Oct-03 13:56
winewind28-Oct-03 13:56 
GeneralRe: some doubts about PeekMessage Pin
yndfcd29-Oct-03 16:08
yndfcd29-Oct-03 16:08 
GeneralRe: some doubts about PeekMessage Pin
winewind29-Oct-03 20:24
winewind29-Oct-03 20:24 
GeneralCFileDialog Pin
Kamesh27-Oct-03 21:08
Kamesh27-Oct-03 21:08 

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.