Click here to Skip to main content
15,922,533 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionProblem with wave audio input device Pin
Remco Hoogenboezem16-Mar-06 21:13
Remco Hoogenboezem16-Mar-06 21:13 
QuestionBSCMAKE: error BK1503 : cannot write to file 'TouchDbg/test.bsc' Pin
itkid16-Mar-06 20:38
itkid16-Mar-06 20:38 
AnswerRe: BSCMAKE: error BK1503 : cannot write to file 'TouchDbg/test.bsc' Pin
Nibu babu thomas16-Mar-06 20:40
Nibu babu thomas16-Mar-06 20:40 
GeneralRe: BSCMAKE: error BK1503 : cannot write to file 'TouchDbg/test.bsc' Pin
itkid16-Mar-06 21:06
itkid16-Mar-06 21:06 
GeneralRe: BSCMAKE: error BK1503 : cannot write to file 'TouchDbg/test.bsc' Pin
Nibu babu thomas16-Mar-06 21:09
Nibu babu thomas16-Mar-06 21:09 
QuestionTo convert BYTE type data to a WORD type Pin
chetan21018316-Mar-06 19:51
chetan21018316-Mar-06 19:51 
AnswerRe: To convert BYTE type data to a WORD type Pin
kakan16-Mar-06 20:24
professionalkakan16-Mar-06 20:24 
AnswerRe: To convert BYTE type data to a WORD type Pin
Johann Gerell16-Mar-06 21:59
Johann Gerell16-Mar-06 21:59 
I assume that by 60 and 25, you mean the hex values 0x3c and 0x19.

If the byte stream arriving is ordered as 0x3c, 0x19, ..., and you want to interpret that as 0x3c19, then you have a big endian stream:
typedef unsigned char byte;
typedef unsigned short word;
const byte low = 0x19;                        // 25
const byte high = 0x3c;                       // 60
const word merged = (word(high) << 8) | low;  // 0x3c19
However, since you want to store it as 6025 in Excel, I assume that you by that mean the string "6025". Otherwise you need to state your need better. To get "6025", you can do this:
const char buffer[33];
const std::string left(_itoa_s(high, buffer, 33, 10));
const std::string right(_itoa_s(low, buffer, 33, 10));
const std::string merged(left + right);
Note: this of course come without warranties, it's the concept that's important here.


--
The Blog: Bits and Pieces
QuestionClear my desktop Pin
Aqueel16-Mar-06 19:49
Aqueel16-Mar-06 19:49 
AnswerRe: Clear my desktop Pin
Nibu babu thomas16-Mar-06 20:48
Nibu babu thomas16-Mar-06 20:48 
GeneralRe: Clear my desktop Pin
Aqueel17-Mar-06 17:17
Aqueel17-Mar-06 17:17 
AnswerRe: Clear my desktop Pin
ThatsAlok17-Mar-06 0:46
ThatsAlok17-Mar-06 0:46 
GeneralRe: Clear my desktop Pin
Aqueel17-Mar-06 17:20
Aqueel17-Mar-06 17:20 
Questiontime to execute instructions Pin
Aqueel16-Mar-06 19:45
Aqueel16-Mar-06 19:45 
AnswerRe: time to execute instructions Pin
Naveen16-Mar-06 20:17
Naveen16-Mar-06 20:17 
AnswerRe: time to execute instructions Pin
ThatsAlok17-Mar-06 0:49
ThatsAlok17-Mar-06 0:49 
Questionhttp port Pin
Girish60116-Mar-06 19:31
Girish60116-Mar-06 19:31 
Questionapp with non-rectangular window Pin
blue_rabbit16-Mar-06 19:11
blue_rabbit16-Mar-06 19:11 
AnswerRe: app with non-rectangular window Pin
Hamid_RT16-Mar-06 19:21
Hamid_RT16-Mar-06 19:21 
Questionerror C3861? Pin
Divyang Mithaiwala16-Mar-06 19:01
Divyang Mithaiwala16-Mar-06 19:01 
JokeRe: error C3861? Pin
<color>Aljechin 16-Mar-06 21:00
<color>Aljechin 16-Mar-06 21:00 
GeneralRe: error C3861? Pin
toxcct17-Mar-06 0:24
toxcct17-Mar-06 0:24 
AnswerRe: error C3861? Pin
RichardS16-Mar-06 23:51
RichardS16-Mar-06 23:51 
AnswerRe: error C3861? Pin
ThatsAlok17-Mar-06 0:51
ThatsAlok17-Mar-06 0:51 
Questionconversion from 'double' to 'unsigned int', Pin
ariesaloksingh16-Mar-06 18:25
ariesaloksingh16-Mar-06 18:25 

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.