Click here to Skip to main content
14,329,993 members

C / C++ / MFC

 
AnswerRe: MFC: CMFCShellTreeCtrl Pin
David Crow16-Apr-15 9:17
memberDavid Crow16-Apr-15 9:17 
Questioncross platform tcp c program Pin
praveenvelu15-Apr-15 18:05
memberpraveenvelu15-Apr-15 18:05 
AnswerRe: cross platform tcp c program Pin
Richard MacCutchan15-Apr-15 21:40
protectorRichard MacCutchan15-Apr-15 21:40 
AnswerRe: cross platform tcp c program Pin
Albert Holguin16-Apr-15 8:25
professionalAlbert Holguin16-Apr-15 8:25 
QuestionCAsyncSockets Blocking/Non blockung Pin
ForNow15-Apr-15 15:41
memberForNow15-Apr-15 15:41 
AnswerRe: CAsyncSockets Blocking/Non blockung Pin
Richard MacCutchan15-Apr-15 21:39
protectorRichard MacCutchan15-Apr-15 21:39 
GeneralRe: CAsyncSockets Blocking/Non blockung Pin
ForNow16-Apr-15 10:38
memberForNow16-Apr-15 10:38 
QuestionInitialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen15-Apr-15 14:59
memberBram van Kampen15-Apr-15 14:59 
Hi,

I have the following Code:
</#include "stdafx.h"

struct DB_FIELD{
    const char* FieldName;
    const char* DesignerComments;
    const unsigned int FieldFlags;

    const int FieldType;
    const int FieldEltSize;
    const int FieldEltCount;
    const int FieldOffset;
    const unsigned char PaddingChar;
};

struct DB_FIELD TestFieldItem={
    "Key",  // FieldName
    NULL,   // DesignerComment
    0X00000000, // Field Flags
    13,     // Field Type
    8,  // Field Elt Size
    1,   //Field Elt Count
    0,   // Field Offset
    0    //Padding Char
};
This refuses to compile with the following error message:
"error C2552: 'TestFieldItem' : non-aggregates cannot be initialized with initializer list".

I must be doing something stupid, that I cannot see. Initialising Static Structures is the Cut and Trust of CPP!
Can anyone see the Obvious?

Smile | :)
Bram van Kampen

AnswerRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Richard MacCutchan15-Apr-15 21:37
protectorRichard MacCutchan15-Apr-15 21:37 
GeneralRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen26-Apr-15 14:39
memberBram van Kampen26-Apr-15 14:39 
AnswerRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
bling17-Apr-15 9:49
memberbling17-Apr-15 9:49 
GeneralRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen26-Apr-15 14:31
memberBram van Kampen26-Apr-15 14:31 
QuestionBuild errors ! Pin
Member 935023715-Apr-15 3:01
memberMember 935023715-Apr-15 3:01 
SuggestionRe: Build errors ! Pin
David Crow15-Apr-15 3:06
memberDavid Crow15-Apr-15 3:06 
GeneralRe: Build errors ! Pin
Member 935023715-Apr-15 3:16
memberMember 935023715-Apr-15 3:16 
GeneralRe: Build errors ! Pin
Richard Andrew x6415-Apr-15 5:48
professionalRichard Andrew x6415-Apr-15 5:48 
GeneralRe: Build errors ! Pin
Member 935023715-Apr-15 6:04
memberMember 935023715-Apr-15 6:04 
QuestionRe: Build errors ! Pin
David Crow15-Apr-15 6:54
memberDavid Crow15-Apr-15 6:54 
GeneralRe: Build errors ! Pin
David Crow15-Apr-15 6:51
memberDavid Crow15-Apr-15 6:51 
GeneralRe: Build errors ! Pin
Brisingr Aerowing15-Apr-15 11:22
professionalBrisingr Aerowing15-Apr-15 11:22 
SuggestionRe: Build errors ! Pin
Richard MacCutchan15-Apr-15 7:19
protectorRichard MacCutchan15-Apr-15 7:19 
QuestionMFC: flickering issue with GDI+ Pin
Member 1128851411-Apr-15 20:27
memberMember 1128851411-Apr-15 20:27 
GeneralRe: MFC: flickering issue with GDI+ Pin
David Crow12-Apr-15 16:55
memberDavid Crow12-Apr-15 16:55 
GeneralRe: MFC: flickering issue with GDI+ Pin
Stephen Hewitt15-Apr-15 10:41
memberStephen Hewitt15-Apr-15 10:41 
QuestionDrawing border to dialog using GDI+ Pin
Member 1128851411-Apr-15 19:30
memberMember 1128851411-Apr-15 19:30 

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.