Click here to Skip to main content
16,010,673 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: pure C question about accessing bits Pin
Justin Tay25-Mar-06 0:17
Justin Tay25-Mar-06 0:17 
GeneralRe: pure C question about accessing bits Pin
bouli25-Mar-06 2:48
bouli25-Mar-06 2:48 
GeneralRe: pure C question about accessing bits Pin
Justin Tay25-Mar-06 5:25
Justin Tay25-Mar-06 5:25 
GeneralRe: pure C question about accessing bits Pin
bouli25-Mar-06 6:16
bouli25-Mar-06 6:16 
GeneralRe: pure C question about accessing bits Pin
Justin Tay25-Mar-06 6:33
Justin Tay25-Mar-06 6:33 
GeneralRe: pure C question about accessing bits Pin
bouli25-Mar-06 6:50
bouli25-Mar-06 6:50 
GeneralRe: pure C question about accessing bits Pin
bouli25-Mar-06 7:05
bouli25-Mar-06 7:05 
GeneralRe: pure C question about accessing bits Pin
bouli16-Apr-06 0:28
bouli16-Apr-06 0:28 
Hello hfry,

Do you remember me and my problem about bits?
You gave me the function that reads the values and it works perfectly. Now, I need the reciproque function: I need to write values...

I remind you the function for reading the data you kindly gave me:

int GetCollisionValue(unsigned char* collisionsMap, int x, int y, int nWidth)
{
int i=x+y*nWidth;
int nArrayPos = i / 4;
int nBytePos = (i % 4) * 2;
int value=(collisionsMap[nArrayPos] >> nBytePos) & 0x03;

return value;
}

Now, I need the "SetAt" function...
void SetAt(unsigned char* collisionsMap, int x, int y, int nWidth, int nValue);

Can you help me again please???

Best regards.

Fred.




There is no spoon.
QuestionOnFind() Pin
fuschia24-Mar-06 21:35
fuschia24-Mar-06 21:35 
AnswerRe: OnFind() Pin
toxcct25-Mar-06 4:53
toxcct25-Mar-06 4:53 
GeneralRe: OnFind() Pin
fuschia25-Mar-06 16:07
fuschia25-Mar-06 16:07 
GeneralRe: OnFind() Pin
toxcct26-Mar-06 3:31
toxcct26-Mar-06 3:31 
QuestionRuntime Compression Pin
Waldermort24-Mar-06 21:19
Waldermort24-Mar-06 21:19 
AnswerRe: Runtime Compression Pin
Saurabh.Garg25-Mar-06 0:48
Saurabh.Garg25-Mar-06 0:48 
GeneralRe: Runtime Compression Pin
Waldermort25-Mar-06 1:28
Waldermort25-Mar-06 1:28 
AnswerRe: Runtime Compression Pin
Hamid_RT25-Mar-06 1:34
Hamid_RT25-Mar-06 1:34 
QuestionFlat DateTimePicker Class Pin
mikobi24-Mar-06 20:31
mikobi24-Mar-06 20:31 
AnswerRe: Flat DateTimePicker Class Pin
mikobi25-Mar-06 3:16
mikobi25-Mar-06 3:16 
Questionproblem with m_strCursor Pin
Kranti125198424-Mar-06 20:21
Kranti125198424-Mar-06 20:21 
QuestionVS2005 - ellipsis in a macro Pin
Chintoo72324-Mar-06 18:42
Chintoo72324-Mar-06 18:42 
AnswerRe: VS2005 - ellipsis in a macro Pin
Michael Dunn25-Mar-06 0:23
sitebuilderMichael Dunn25-Mar-06 0:23 
GeneralRe: VS2005 - ellipsis in a macro Pin
Chintoo72325-Mar-06 22:50
Chintoo72325-Mar-06 22:50 
GeneralRe: VS2005 - ellipsis in a macro Pin
Michael Dunn26-Mar-06 12:22
sitebuilderMichael Dunn26-Mar-06 12:22 
QuestionLan Connection Pin
vivek.s.vivek24-Mar-06 17:55
vivek.s.vivek24-Mar-06 17:55 
AnswerRe: Lan Connection Pin
ThatsAlok24-Mar-06 18:52
ThatsAlok24-Mar-06 18: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.