Click here to Skip to main content
15,879,490 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: in win32api resize window Pin
Albert Holguin17-Jan-12 6:54
professionalAlbert Holguin17-Jan-12 6:54 
AnswerRe: in win32api resize window Pin
Albert Holguin17-Jan-12 6:48
professionalAlbert Holguin17-Jan-12 6:48 
AnswerRe: in win32api resize window Pin
CPallini17-Jan-12 6:50
mveCPallini17-Jan-12 6:50 
AnswerRe: in win32api resize window Pin
David Crow17-Jan-12 6:54
David Crow17-Jan-12 6:54 
AnswerRe: in win32api resize window Pin
PJ Arends17-Jan-12 9:27
professionalPJ Arends17-Jan-12 9:27 
GeneralRe: in win32api resize window Pin
a1_shay17-Jan-12 11:44
a1_shay17-Jan-12 11:44 
GeneralRe: in win32api resize window Pin
Albert Holguin17-Jan-12 13:58
professionalAlbert Holguin17-Jan-12 13:58 
QuestionC syntax problem Pin
__John_16-Jan-12 23:25
__John_16-Jan-12 23:25 
Hi,

The following code compiles no probs...

C#
typedef struct SLLNode_t
{
    void* m_pData;
    struct SLLNode_t* m_pNext;
};


void foo()
{
    struct SLLNode_t* pNewNode = (struct SLLNode_t*)malloc(sizeof(struct SLLNode_t));
}


The following, with a call to assert, generates a an error C2143: syntax error : missing ';' before 'type'.

C#
typedef struct SLLNode_t
{
    void* m_pData;
    struct SLLNode_t* m_pNext;
};


void foo()
{
    assert(0 == 0);

    struct SLLNode_t* pNewNode = (struct SLLNode_t*)malloc(sizeof(struct SLLNode_t)); // < C2143 here.
}


assert is defined as follows...

#define assert(_Expression) (void)( (!!(_Expression)) || (_wassert(_CRT_WIDE(#_Expression), _CRT_WIDE(__FILE__), __LINE__), 0) )


What is wrong? How do I fix it?

Thanks - John.
“If I had asked people what they wanted, they would have said faster horses.”
― Henry Ford

AnswerRe: C syntax problem Pin
CPallini16-Jan-12 23:44
mveCPallini16-Jan-12 23:44 
GeneralRe: C syntax problem Pin
«_Superman_»17-Jan-12 0:12
professional«_Superman_»17-Jan-12 0:12 
GeneralRe: C syntax problem Pin
CPallini17-Jan-12 0:17
mveCPallini17-Jan-12 0:17 
GeneralRe: C syntax problem Pin
«_Superman_»17-Jan-12 0:28
professional«_Superman_»17-Jan-12 0:28 
GeneralRe: C syntax problem Pin
CPallini17-Jan-12 0:32
mveCPallini17-Jan-12 0:32 
GeneralRe: C syntax problem Pin
__John_17-Jan-12 0:32
__John_17-Jan-12 0:32 
GeneralRe: C syntax problem Pin
CPallini17-Jan-12 0:33
mveCPallini17-Jan-12 0:33 
AnswerRe: C syntax problem Pin
Richard Andrew x6417-Jan-12 6:30
professionalRichard Andrew x6417-Jan-12 6:30 
GeneralRe: C syntax problem Pin
Albert Holguin17-Jan-12 6:50
professionalAlbert Holguin17-Jan-12 6:50 
QuestionRe: C syntax problem Pin
CPallini17-Jan-12 6:54
mveCPallini17-Jan-12 6:54 
GeneralRe: C syntax problem Pin
David Crow17-Jan-12 6:55
David Crow17-Jan-12 6:55 
GeneralRe: C syntax problem Pin
__John_26-Jan-12 4:34
__John_26-Jan-12 4:34 
QuestionProblem declaring data type Pin
marca29216-Jan-12 22:16
marca29216-Jan-12 22:16 
AnswerRe: Problem declaring data type Pin
Richard MacCutchan16-Jan-12 23:05
mveRichard MacCutchan16-Jan-12 23:05 
GeneralRe: Problem declaring data type Pin
marca29216-Jan-12 23:18
marca29216-Jan-12 23:18 
AnswerRe: Problem declaring data type Pin
Jochen Arndt16-Jan-12 23:05
professionalJochen Arndt16-Jan-12 23:05 
GeneralRe: Problem declaring data type Pin
marca29216-Jan-12 23:27
marca29216-Jan-12 23:27 

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.