Click here to Skip to main content
       

Managed C++/CLI

 
QuestionWindows Shutdown notification in a MFC Dialog app Pinmembersunilkpv13-Sep-12 0:20 
AnswerRe: Windows Shutdown notification in a MFC Dialog app PinmvpRichard MacCutchan13-Sep-12 0:27 
GeneralRe: Windows Shutdown notification in a MFC Dialog app PinmemberRajesh R Subramanian20-Sep-12 3:36 
GeneralRe: Windows Shutdown notification in a MFC Dialog app PinmvpRichard MacCutchan20-Sep-12 3:56 
GeneralRe: Windows Shutdown notification in a MFC Dialog app PinmemberWes Aday20-Sep-12 5:53 
GeneralRe: Windows Shutdown notification in a MFC Dialog app PinmvpRichard MacCutchan20-Sep-12 6:09 
GeneralRe: Windows Shutdown notification in a MFC Dialog app Pinmembersunilkpv20-Sep-12 4:58 
QuestionQuestion about ternary operator in initializer list Pinmemberelelont211-Sep-12 22:29 
Hi,
i have two classes, and i am trying to use the ternary operator in the initializer list to initialize Class2 memeber to some value or null based on the data in MyClass2 constructor:
 
MyClass
{
...
int x;
int y;
}
 
MyClass2
{
...
MyClass myObj;
}
 

MyClass2 Constructor:
 
Version 1)
MyClass2(const AnotherClass* data) :
      myObj(data ? data->x : MyClass()) --compile error
 
Version 2)
MyClass2(const AnotherClass* data) :
      myObj(data ? data->x : MyClass my) --synatax error
 
I get the following error: error: no match for ternary 'operator?:' in ...
 
How could i fix this?
Thanks
AnswerRe: Question about ternary operator in initializer list Pinmemberjschell12-Sep-12 8:13 
AnswerRe: Question about ternary operator in initializer list PinmvpRichard MacCutchan12-Sep-12 22:32 
Questionimage to speech and speech to image Pinmemberbuzz chemistry11-Sep-12 8:11 
AnswerRe: image to speech and speech to image PinmemberKenneth Haugland11-Sep-12 10:20 
GeneralRe: image to speech and speech to image Pinmemberbuzz chemistry4-Jan-13 13:45 
AnswerRe: image to speech and speech to image Pinmemberjschell11-Sep-12 11:56 
GeneralRe: image to speech and speech to image Pinmemberbuzz chemistry4-Jan-13 13:47 
Questionc++ small project PinmemberAsmita s. patil9-Sep-12 4:38 
AnswerCross post PinmemberWes Aday9-Sep-12 5:51 
AnswerRe: c++ small project PinmemberShameel19-Sep-12 23:48 
QuestionMCF Class Templates Pinmemberdavidconnerley5-Sep-12 10:34 
AnswerRe: MCF Class Templates PinmemberWes Aday5-Sep-12 11:49 
SuggestionRe: MCF Class Templates PinmemberAlbert Holguin5-Sep-12 12:30 
GeneralRe: MCF Class Templates PinmemberWes Aday5-Sep-12 12:56 
AnswerRe: MCF Class Templates PinmemberAlbert Holguin5-Sep-12 12:31 
AnswerRe: MCF Class Templates PinmvpRichard MacCutchan5-Sep-12 23:25 
Questionheap corruption error Pinmemberigotmymtv200521-Aug-12 9:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.140718.1 | Last Updated 11 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid