Click here to Skip to main content
15,888,527 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: access dynamically allocated structure Pin
Eugen Podsypalnikov31-Mar-10 2:29
Eugen Podsypalnikov31-Mar-10 2:29 
GeneralRe: access dynamically allocated structure Pin
Richard MacCutchan31-Mar-10 2:35
mveRichard MacCutchan31-Mar-10 2:35 
GeneralRe: access dynamically allocated structure Pin
Eugen Podsypalnikov31-Mar-10 2:37
Eugen Podsypalnikov31-Mar-10 2:37 
GeneralRe: access dynamically allocated structure Pin
Richard MacCutchan31-Mar-10 3:03
mveRichard MacCutchan31-Mar-10 3:03 
GeneralRe: access dynamically allocated structure Pin
Eugen Podsypalnikov31-Mar-10 3:09
Eugen Podsypalnikov31-Mar-10 3:09 
GeneralRe: access dynamically allocated structure Pin
rupeshkp72831-Mar-10 2:35
rupeshkp72831-Mar-10 2:35 
AnswerRe: access dynamically allocated structure Pin
Richard MacCutchan31-Mar-10 2:32
mveRichard MacCutchan31-Mar-10 2:32 
AnswerRe: access dynamically allocated structure Pin
CPallini31-Mar-10 2:36
mveCPallini31-Mar-10 2:36 
Your code is really ugly.

rupeshkp728 wrote:
#define UINT32 unsigned int
#define INT32 int
#define UCHAR unsigned char

Why do you use #define instead of typedef?


rupeshkp728 wrote:
typedef struct CheckSumPair
{
UINT32 weakcs; // The weak, rolling Adler32 checksum.
UCHAR StrongCS[10];
};

Typedef what?

rupeshkp728 wrote:
CheckSumPair* CSPair = (CheckSumPair*)malloc(sizeof(CheckSumPair)*10);

Why are you using malloc? Do you really need to use C memory allocation functions?

rupeshkp728 wrote:
strncpy((char*)CSPair->StrongCSString,(char*)"CEDVCD",10*2+1);

struct CheckSumPair has no StrongCSString member.


rupeshkp728 wrote:
printf("%d %s %s\n\n",CSPair[x]->.weakcs,CSPair[x]->StrongCS,CSPair[x]->StrongCSString);

This is the ugliest part. What are you trying to do?

Smile | :)
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]

AnswerRe: access dynamically allocated structure Pin
KingsGambit31-Mar-10 2:36
KingsGambit31-Mar-10 2:36 
AnswerRe: access dynamically allocated structure Pin
Member 392263931-Mar-10 2:52
Member 392263931-Mar-10 2:52 
Questionerror C2664 Pin
002comp30-Mar-10 22:18
002comp30-Mar-10 22:18 
AnswerRe: error C2664 Pin
KingsGambit30-Mar-10 22:27
KingsGambit30-Mar-10 22:27 
GeneralRe: error C2664 Pin
002comp30-Mar-10 23:16
002comp30-Mar-10 23:16 
GeneralRe: error C2664 [modified] Pin
CPallini30-Mar-10 23:28
mveCPallini30-Mar-10 23:28 
AnswerRe: error C2664 Pin
Eugen Podsypalnikov31-Mar-10 0:00
Eugen Podsypalnikov31-Mar-10 0:00 
GeneralRe: error C2664 [modified] Pin
002comp31-Mar-10 1:54
002comp31-Mar-10 1:54 
GeneralRe: error C2664 Pin
KingsGambit30-Mar-10 23:34
KingsGambit30-Mar-10 23:34 
GeneralRe: error C2664 Pin
002comp31-Mar-10 1:35
002comp31-Mar-10 1:35 
GeneralRe: error C2664 Pin
KingsGambit31-Mar-10 2:03
KingsGambit31-Mar-10 2:03 
GeneralRe: error C2664 Pin
002comp31-Mar-10 2:14
002comp31-Mar-10 2:14 
GeneralRe: error C2664 Pin
KingsGambit31-Mar-10 2:18
KingsGambit31-Mar-10 2:18 
GeneralRe: error C2664 Pin
002comp31-Mar-10 2:28
002comp31-Mar-10 2:28 
GeneralRe: error C2664 Pin
Emilio Garavaglia30-Mar-10 23:57
Emilio Garavaglia30-Mar-10 23:57 
AnswerRe: error C2664 Pin
arun_pk30-Mar-10 23:26
arun_pk30-Mar-10 23:26 
QuestionCan the OnSelchange event of the combo box be accessed in any other page Pin
hansrajlal30-Mar-10 21:00
hansrajlal30-Mar-10 21:00 

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.