Click here to Skip to main content
15,895,256 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat does this do ?? Pin
Programm3r5-Sep-07 23:44
Programm3r5-Sep-07 23:44 
AnswerRe: What does this do ?? Pin
Cedric Moonen5-Sep-07 23:50
Cedric Moonen5-Sep-07 23:50 
GeneralRe: What does this do ?? Pin
Programm3r5-Sep-07 23:51
Programm3r5-Sep-07 23:51 
Questionsleep function Pin
p_5-Sep-07 23:38
p_5-Sep-07 23:38 
AnswerRe: sleep function Pin
Cedric Moonen5-Sep-07 23:43
Cedric Moonen5-Sep-07 23:43 
GeneralRe: sleep function Pin
p_5-Sep-07 23:53
p_5-Sep-07 23:53 
JokeRe: sleep function Pin
BadKarma6-Sep-07 2:19
BadKarma6-Sep-07 2:19 
QuestionRead bits from a binary file. Pin
CodingLover5-Sep-07 23:27
CodingLover5-Sep-07 23:27 
Hi all,Smile | :)

I have a binary file. I want to read as it is(i mean ones and zeros), and at the same time need to store in an array. Here is the code I used to read the file.

<br />
ifstream file( "G00046_002_01.srf" ) ; <br />
file >> noskipws ;<br />
typedef bitset< numeric_limits<unsigned char>::digits > bitset ;<br />
unsigned char byte ;<br />
<br />
if(filebin.is_open())<br />
{<br />
	while( file >> byte )<br />
	{<br />
		cout << bitset(byte) ; <br />
		filebin << bitset(byte) ;<br />
	}<br />
	filebin.close() ;<br />
}<br />


Can you guys tell me how store those zeros and ones on an array. I confusing that working with dynamic data and arrays. Tried, but failed.

Hi all....

AnswerRe: Read bits from a binary file. Pin
Programm3r5-Sep-07 23:48
Programm3r5-Sep-07 23:48 
GeneralRe: Read bits from a binary file. Pin
CodingLover5-Sep-07 23:54
CodingLover5-Sep-07 23:54 
QuestionHow to check whether cts pin is on or off using vc++ Pin
yaminisridaran5-Sep-07 23:13
yaminisridaran5-Sep-07 23:13 
AnswerRe: How to check whether cts pin is on or off using vc++ Pin
Cedric Moonen5-Sep-07 23:20
Cedric Moonen5-Sep-07 23:20 
GeneralRe: How to check whether cts pin is on or off using vc++ Pin
yaminisridaran5-Sep-07 23:25
yaminisridaran5-Sep-07 23:25 
GeneralRe: How to check whether cts pin is on or off using vc++ Pin
Cedric Moonen5-Sep-07 23:58
Cedric Moonen5-Sep-07 23:58 
GeneralRe: How to check whether cts pin is on or off using vc++ Pin
yaminisridaran6-Sep-07 0:00
yaminisridaran6-Sep-07 0:00 
GeneralRe: How to check whether cts pin is on or off using vc++ Pin
kakan6-Sep-07 0:07
professionalkakan6-Sep-07 0:07 
QuestionRe: How to check whether cts pin is on or off using vc++ Pin
David Crow6-Sep-07 3:11
David Crow6-Sep-07 3:11 
QuestionCopy the data in List control using ctrl+C Pin
shir_k5-Sep-07 23:12
shir_k5-Sep-07 23:12 
AnswerRe: Copy the data in List control using ctrl+C Pin
ThatsAlok5-Sep-07 23:31
ThatsAlok5-Sep-07 23:31 
GeneralRe: Copy the data in List control using ctrl+C Pin
shir_k6-Sep-07 1:18
shir_k6-Sep-07 1:18 
GeneralRe: Copy the data in List control using ctrl+C Pin
Nishad S6-Sep-07 1:38
Nishad S6-Sep-07 1:38 
GeneralRe: Copy the data in List control using ctrl+C Pin
shir_k6-Sep-07 2:27
shir_k6-Sep-07 2:27 
GeneralRe: Copy the data in List control using ctrl+C Pin
David Crow6-Sep-07 3:19
David Crow6-Sep-07 3:19 
GeneralRe: Copy the data in List control using ctrl+C Pin
ThatsAlok6-Sep-07 5:02
ThatsAlok6-Sep-07 5:02 
GeneralRe: Copy the data in List control using ctrl+C [modified] Pin
shir_k8-Sep-07 19:52
shir_k8-Sep-07 19:52 

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.