Click here to Skip to main content
15,893,266 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how can i use CDC pointer base on dailog!! Pin
khan++17-Oct-05 22:31
khan++17-Oct-05 22:31 
AnswerRe: how can i use CDC pointer base on dailog!! Pin
Mircea Puiu18-Oct-05 1:27
Mircea Puiu18-Oct-05 1:27 
QuestionPlease help me Pin
dSolariuM17-Oct-05 21:30
dSolariuM17-Oct-05 21:30 
AnswerRe: Please help me Pin
ThatsAlok17-Oct-05 21:52
ThatsAlok17-Oct-05 21:52 
QuestionListbox with VScrollBar Pin
P-Rex17-Oct-05 21:16
P-Rex17-Oct-05 21:16 
AnswerRe: Listbox with VScrollBar Pin
khan++17-Oct-05 22:44
khan++17-Oct-05 22:44 
QuestionHow to set the size of the view? Pin
yuduntang17-Oct-05 20:43
yuduntang17-Oct-05 20:43 
QuestionTrouble in writing a CRC CCITT program Pin
LaHaHa17-Oct-05 20:05
LaHaHa17-Oct-05 20:05 
I have trouble in writing a CRC CCITT program.
My program is :

#define CRC_CCITT 0x011021
#define INIT_CRC16 0x01ffff

int nn=0, n=0, nbytes=CRCArray.GetSize();
crc = INIT_CRC16;

while(nbytes-- > 0)
{
nn=CRCArray.GetAt(n);
for (i=0x80; i >=0x01; i>>=1)
{
crc <<= 1;
if (nn&i)
crc = crc^0x000001;
else
crc = crc&0xFFFFFE;
if (crc & 0x010000)
crc ^= CRC_CCITT;
}
n++;
}
I get a correct answer as this website
http://zorc.breitbandkatze.de/crc.html

But I got a wrong answer with my tester.
I know that the crc program of my tester is using "fast crc"(fcstab).

// Initialize the Init Flag
*theCrc = theInitFlag;
int length = theBuffer.length();

// Create the crc using fcstab
for (int i = 0; i < length; i++)
{
(*theCrc) = (unsigned short)(((*theCrc) >> 8) ^ fcstab[((*theCrc) ^ theBuffer[i]) & 0xff]);
}
Is there any one try this before?
Please help!
AnswerRe: Trouble in writing a CRC CCITT program Pin
kakan17-Oct-05 20:13
professionalkakan17-Oct-05 20:13 
GeneralRe: Trouble in writing a CRC CCITT program Pin
LaHaHa17-Oct-05 21:07
LaHaHa17-Oct-05 21:07 
GeneralRe: Trouble in writing a CRC CCITT program Pin
kakan18-Oct-05 0:07
professionalkakan18-Oct-05 0:07 
GeneralRe: Trouble in writing a CRC CCITT program Pin
LaHaHa18-Oct-05 5:52
LaHaHa18-Oct-05 5:52 
GeneralRe: Trouble in writing a CRC CCITT program Pin
Kythen18-Oct-05 11:17
Kythen18-Oct-05 11:17 
GeneralRe: Trouble in writing a CRC CCITT program Pin
LaHaHa18-Oct-05 14:25
LaHaHa18-Oct-05 14:25 
Questionhow to adjust printing size of OnFilePrint() function {CView } ; Pin
vikas amin17-Oct-05 20:04
vikas amin17-Oct-05 20:04 
QuestionHelp -- something faster than Getline() ?? Pin
webHamlet17-Oct-05 19:51
webHamlet17-Oct-05 19:51 
AnswerRe: Help -- something faster than Getline() ?? Pin
The NULL Developer17-Oct-05 21:03
professionalThe NULL Developer17-Oct-05 21:03 
GeneralRe: Help -- something faster than Getline() ?? Pin
Anonymous18-Oct-05 6:41
Anonymous18-Oct-05 6:41 
AnswerRe: Help -- something faster than Getline() ?? Pin
kakan18-Oct-05 1:19
professionalkakan18-Oct-05 1:19 
GeneralRe: Help -- something faster than Getline() ?? Pin
Anonymous18-Oct-05 6:40
Anonymous18-Oct-05 6:40 
GeneralRe: Help -- something faster than Getline() ?? Pin
kakan18-Oct-05 19:23
professionalkakan18-Oct-05 19:23 
QuestionUse Sockets in a DLL Pin
tobeymag17-Oct-05 19:27
tobeymag17-Oct-05 19:27 
AnswerRe: Use Sockets in a DLL Pin
xxrl17-Oct-05 20:23
xxrl17-Oct-05 20:23 
GeneralRe: Use Sockets in a DLL Pin
tobeymag18-Oct-05 19:20
tobeymag18-Oct-05 19:20 
GeneralRe: Use Sockets in a DLL Pin
xxrl19-Oct-05 19:16
xxrl19-Oct-05 19:16 

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.