Click here to Skip to main content
15,892,643 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Excel Sheet Controls Pin
David Crow28-Oct-03 4:24
David Crow28-Oct-03 4:24 
GeneralWinsock question Pin
Alexander M.,28-Oct-03 2:13
Alexander M.,28-Oct-03 2:13 
QuestionHow to filter URL and Web in windows2000/WinXP? Pin
mydapeng28-Oct-03 1:54
mydapeng28-Oct-03 1:54 
AnswerRe: How to filter URL and Web in windows2000/WinXP? Pin
valikac28-Oct-03 5:48
valikac28-Oct-03 5:48 
GeneralRe: How to filter URL and Web in windows2000/WinXP? Pin
mydapeng28-Oct-03 14:29
mydapeng28-Oct-03 14:29 
GeneralRe: How to filter URL and Web in windows2000/WinXP? Pin
valikac29-Oct-03 5:52
valikac29-Oct-03 5:52 
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 
Hi everyone,

I have a C++ question.

I have the following data format:

----------------------------
byte 3 unsigned 8 bits
----------------------------
Byte 2 unsigned 8 bits
----------------------------
Byte 1 unsigned 8 bits
----------------------------
Byte 0 unsigned 8 bits
----------------------------

Now, I have a pointer to byte 0. I have an unsigned short encoded in Byte 2 and byte 1.

So, what should I do...

assume baseData = pointer to byte 0

unsigned short myVal = *(baseData + 1)

or

unsigned short myVal = *(baseData + 2)

My initial feeling was that the latter is correct. But I am usually wrong in things like this Smile | :)

Thanks

Without struggle, there is no progress
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 
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 

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.