Click here to Skip to main content
15,886,806 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How many waveInPrepareHeader buffers I need to retrive data from audio device? Pin
Vaclav_6-Jul-11 15:29
Vaclav_6-Jul-11 15:29 
QuestionHow to?? Pin
john56325-Jul-11 3:08
john56325-Jul-11 3:08 
AnswerRe: How to?? [modified] Pin
Rajesh R Subramanian5-Jul-11 3:30
professionalRajesh R Subramanian5-Jul-11 3:30 
QuestionRe: How to?? Pin
CPallini5-Jul-11 3:41
mveCPallini5-Jul-11 3:41 
AnswerRe: How to?? Pin
Rajesh R Subramanian5-Jul-11 3:44
professionalRajesh R Subramanian5-Jul-11 3:44 
GeneralRe: How to?? Pin
ThatsAlok5-Jul-11 23:19
ThatsAlok5-Jul-11 23:19 
GeneralRe: How to?? Pin
Rajesh R Subramanian6-Jul-11 4:06
professionalRajesh R Subramanian6-Jul-11 4:06 
AnswerRe: How to?? Pin
CPallini5-Jul-11 3:35
mveCPallini5-Jul-11 3:35 
C++
#include <windows.h>
#include <iostream>

using namespace std;

union MyUnion
{
  ULONGLONG ull;
  BYTE b[8];
};

int main()
{
  ULONGLONG v = 0x0123456789ABCDEF;
  MyUnion mu;
  mu.ull = v;
  for (int i=0; i<6; i++)
  {
    // assuming you need the least significative bytes
    cout << hex << (INT) mu.b[i] << endl;
  }
}

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

Questionwhat is the maximum combination for generate random string of given length? Pin
Le@rner5-Jul-11 0:40
Le@rner5-Jul-11 0:40 
AnswerRe: what is the maximum combination for generate random string of given length? Pin
Rajesh R Subramanian5-Jul-11 0:55
professionalRajesh R Subramanian5-Jul-11 0:55 
AnswerRe: what is the maximum combination for generate random string of given length? Pin
T.RATHA KRISHNAN5-Jul-11 1:03
T.RATHA KRISHNAN5-Jul-11 1:03 
AnswerRe: what is the maximum combination for generate random string of given length? Pin
enhzflep5-Jul-11 1:53
enhzflep5-Jul-11 1:53 
QuestionRegarding - Compression and uncompression algarthm source code in c Pin
Jayasreeg4-Jul-11 23:32
Jayasreeg4-Jul-11 23:32 
AnswerRe: Regarding - Compression and uncompression algarthm source code in c Pin
Richard MacCutchan5-Jul-11 0:16
mveRichard MacCutchan5-Jul-11 0:16 
AnswerRe: Regarding - Compression and uncompression algarthm source code in c Pin
Chris Losinger5-Jul-11 5:17
professionalChris Losinger5-Jul-11 5:17 
QuestionReadFile operation Pin
MKC0024-Jul-11 22:27
MKC0024-Jul-11 22:27 
AnswerRe: ReadFile operation Pin
enhzflep4-Jul-11 22:49
enhzflep4-Jul-11 22:49 
AnswerRe: ReadFile operation Pin
Richard MacCutchan5-Jul-11 0:14
mveRichard MacCutchan5-Jul-11 0:14 
QuestionRe: ReadFile operation Pin
David Crow5-Jul-11 2:52
David Crow5-Jul-11 2:52 
AnswerRe: ReadFile operation Pin
MKC0027-Jul-11 5:26
MKC0027-Jul-11 5:26 
AnswerRe: ReadFile operation Pin
Rolf Kristensen27-Jul-11 12:39
Rolf Kristensen27-Jul-11 12:39 
QuestionHow to communicate with server in vc++? Pin
Le@rner4-Jul-11 20:35
Le@rner4-Jul-11 20:35 
AnswerRe: How to communicate with server in vc++? Pin
Rajesh R Subramanian4-Jul-11 21:00
professionalRajesh R Subramanian4-Jul-11 21:00 
AnswerRe: How to communicate with server in vc++? Pin
T.RATHA KRISHNAN4-Jul-11 21:34
T.RATHA KRISHNAN4-Jul-11 21:34 
GeneralRe: How to communicate with server in vc++? Pin
Le@rner4-Jul-11 21:53
Le@rner4-Jul-11 21:53 

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.