Click here to Skip to main content

VS 2012/2013 & .NET 4.5.1

 
AnswerRe: shortcut keys PinmemberMike Meinz23-Jan-13 3:28 
GeneralRe: shortcut keys Pinmembersrinivasankrishnaa16-Feb-13 3:20 
GeneralRe: shortcut keys PinmemberMike Meinz16-Feb-13 4:08 
QuestionC++/Cx syntax error PinmemberSuper Lloyd14-Jan-13 2:47 
NewsProblem solved PinmemberSuper Lloyd14-Jan-13 2:55 
QuestionAdding form close event Pinmemberandrew charles21-Dec-12 20:28 
SuggestionRe: Adding form close event PinmvpRichard MacCutchan21-Dec-12 23:07 
QuestionC++Cx / WinRT: Parameterized constructor (and operator overloading) for 'public value struct' PinmemberSuper Lloyd20-Dec-12 2:08 
I have a C++/Cx class like so
public value struct float2
{
	float x,y;
};
I'd like to add a constructor with parameter like
public value struct float2
{
	float x,y;
	float2(float _x, float _y);
};
and I got a compiler error. Some googling later it seems it's not possible to add a constructor to a struct.. mm... fine I guess...
 
Then later I was looking at
public value class Windows::Foundation::Size,
 
And it has a parameterized constructor!!!
Windows::Foundation::Size::Size(float w, float h)!!!
 

This WinRT API value class has a public constructor with parameters!! (it even implement operator overloading!)
but The best I tried I couldn't implement paremeterized constructor and operator overloading for my own value struct.. Frown | :(
 
Can someone show me how to declare / implement a simple parameterized constructor (and operator overloading for '+') on my simple class above please?!!!!!!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

AnswerRe: C++Cx / WinRT: Parameterized constructor (and operator overloading) for 'public value struct' PinmemberSuper Lloyd20-Dec-12 18:50 
Questionvc++ Pinmembersrinivasankrishnaa14-Dec-12 6:37 
AnswerRe: vc++ PinmemberSuper Lloyd14-Dec-12 20:11 
GeneralRe: vc++ Pinmembersrinivasankrishnaa17-Dec-12 4:22 
AnswerRe: vc++ PinmemberProgramFOX23-Dec-12 4:04 
AnswerRe: vc++ PinmemberEdo Tzumer2-Feb-13 23:12 
QuestionWInRT component and event grief PinmemberSuper Lloyd11-Dec-12 4:51 
AnswerRe: WInRT component and event grief PinprotectorPete O'Hanlon11-Dec-12 6:23 
GeneralRe: WInRT component and event grief PinmemberSuper Lloyd12-Dec-12 3:14 
GeneralRe: WInRT component and event grief PinprotectorPete O'Hanlon12-Dec-12 3:19 
GeneralRe: WInRT component and event grief PinmemberSuper Lloyd12-Dec-12 11:25 
GeneralRe: WInRT component and event grief PinprotectorPete O'Hanlon12-Dec-12 12:02 
GeneralRe: WInRT component and event grief PinmemberSuper Lloyd12-Dec-12 23:45 
GeneralRe: WInRT component and event grief PinmemberSuper Lloyd14-Dec-12 20:09 
GeneralRe: WInRT component and event grief PinprotectorPete O'Hanlon14-Dec-12 22:50 
GeneralRe: WInRT component and event grief PinmemberSuper Lloyd15-Dec-12 1:57 
GeneralRe: WInRT component and event grief PinprotectorPete O'Hanlon15-Dec-12 10:34 

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.140926.1 | Last Updated 22 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid