Click here to Skip to main content
15,919,479 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CWnd::SetTimer - machine dependant ? Pin
Gary R. Wheeler19-Nov-05 11:00
Gary R. Wheeler19-Nov-05 11:00 
GeneralRe: CWnd::SetTimer - machine dependant ? Pin
ThatsAlok21-Nov-05 0:55
ThatsAlok21-Nov-05 0:55 
GeneralRe: CWnd::SetTimer - machine dependant ? Pin
ddmcr21-Nov-05 1:54
ddmcr21-Nov-05 1:54 
QuestionProper Programming Style Pin
Magadass19-Nov-05 5:07
Magadass19-Nov-05 5:07 
AnswerRe: Proper Programming Style Pin
Trollslayer19-Nov-05 6:24
mentorTrollslayer19-Nov-05 6:24 
AnswerRe: Proper Programming Style Pin
Bob Stanneveld19-Nov-05 6:59
Bob Stanneveld19-Nov-05 6:59 
QuestionProblem in initializing the structure member in VC++ Pin
Sasikumar.SR19-Nov-05 2:27
Sasikumar.SR19-Nov-05 2:27 
AnswerRe: Problem in initializing the structure member in VC++ Pin
PJ Arends19-Nov-05 13:32
professionalPJ Arends19-Nov-05 13:32 
S.R.Sasi Kumar wrote:
i'm getting compile time error.


What error? Is it C2552: 'two' : non-aggregates cannot be initialized with initializer list?

Only aggregate types can be initialized with an initializer list. Aggregate types are arrays, classes or structures that have:
- no constructors
- no private or protected members
- no base classes
- no virtual functions
- no non-aggregate members

CString has constructors and protected members so it is a non-aggregate type. As struct one has a non-aggregate member, it is also a non-aggregate, so you get error C2552.

struct one
{
   CString name;
} two;
two.name = "doubt";




"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

"Obviously ???  You're definitely a superstar!!!" - mYkel - 21 Jun '04

"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05

Within you lies the power for good - Use it!
AnswerRe: Problem in initializing the structure member in VC++ Pin
Gary R. Wheeler20-Nov-05 4:07
Gary R. Wheeler20-Nov-05 4:07 
GeneralRe: Problem in initializing the structure member in VC++ Pin
Sasikumar.SR20-Nov-05 22:54
Sasikumar.SR20-Nov-05 22:54 
QuestionLNK2005 error when using structure Pin
Sasikumar.SR19-Nov-05 2:19
Sasikumar.SR19-Nov-05 2:19 
AnswerRe: LNK2005 error when using structure Pin
Gary R. Wheeler19-Nov-05 5:36
Gary R. Wheeler19-Nov-05 5:36 
QuestionHow to round float number to the closest int?? Pin
Ming Luo19-Nov-05 0:44
Ming Luo19-Nov-05 0:44 
AnswerRe: How to round float number to the closest int?? Pin
toxcct19-Nov-05 0:48
toxcct19-Nov-05 0:48 
AnswerRe: How to round float number to the closest int?? Pin
Stan Shannon19-Nov-05 1:19
Stan Shannon19-Nov-05 1:19 
GeneralRe: How to round float number to the closest int?? Pin
Tim Smith20-Nov-05 7:02
Tim Smith20-Nov-05 7:02 
AnswerRe: How to round float number to the closest int?? Pin
Rick York19-Nov-05 7:37
mveRick York19-Nov-05 7:37 
Questionproblems in Pointer overflow/underflow Pin
K. narasimharao19-Nov-05 0:20
K. narasimharao19-Nov-05 0:20 
AnswerRe: problems in Pointer overflow/underflow Pin
khan++19-Nov-05 0:37
khan++19-Nov-05 0:37 
GeneralRe: problems in Pointer overflow/underflow Pin
toxcct19-Nov-05 0:43
toxcct19-Nov-05 0:43 
AnswerRe: problems in Pointer overflow/underflow Pin
toxcct19-Nov-05 0:43
toxcct19-Nov-05 0:43 
QuestionPrinter driver development Pin
mohsin_m18-Nov-05 23:26
mohsin_m18-Nov-05 23:26 
QuestionFile monitor program ? Pin
kendao18-Nov-05 22:37
kendao18-Nov-05 22:37 
AnswerRe: File monitor program ? Pin
khan++18-Nov-05 22:59
khan++18-Nov-05 22:59 
AnswerRe: File monitor program ? Pin
ThatsAlok20-Nov-05 21:12
ThatsAlok20-Nov-05 21:12 

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.