|
Thanks,
Tried that, but see my reply to NightOwl above
Regards,
LateNightsInNewry
|
|
|
|
|
Hi guys, this is my first post here.
Quick, maybe stupid question, just the way I'm doing this doesn't seem right.
I'm doing an assignment that manipulates and generates some genealogy data and
I'm having a problem figuring out for this part if my code is correct.
This is the assignment prompt for specific part i'm having a problem with:
A default constructor with three arguments (in the same order listed above) that sets the three data members to the values of the arguments. Each argument should be given a default value of 0 in the method prototype.
This is the coding I currently have for that declaration that I'm unsure of:
Date(int day = 0, int month = 0, int year = 0);
Any help here would be greatly appreciated, want to make sure I get this assignment right after
the grades on the last couple! Haha
Thanks guys.
mr. chips
|
|
|
|
|
Does it compile? Quick glance it should...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Default values should appear in the Declaration, and Not in the implementation of the Function. What you wrote implies that one
can construct as follows:-
Date::Date(int day = 0, int month = 0, int year = 0);
Date d;
Date d1(7);
Date d2(7,5);
Date d3(7,5,4);
This will initialise EXACTLY the same at:-
Date d(0,0,0);
Date d1(7,0,0);
Date d2(7,5,0);
Date d3(7,5,4);
LateNightsInNewry
|
|
|
|
|
I want to change the height of the title bar of a dialog?
Thanks.
GOOD LUCK
|
|
|
|
|
Handle the WM_NCCALCSIZE message.
|
|
|
|
|
thanks.
And would you like to give me a guid to do this?
|
|
|
|
|
kcynic wrote: give me a guid
// {BD04FCCA-6D18-44a7-B841-A32D429408CA}
static const GUID kcynicsGuid =
{ 0xbd04fcca, 0x6d18, 0x44a7, { 0xb8, 0x41, 0xa3, 0x2d, 0x42, 0x94, 0x8, 0xca } };
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the number 3
|
|
|
|
|
I'm sorry,I meant give me a guide which I can follow.
Thanks.
|
|
|
|
|
I know - sorry, I couldn't help it - you set yourself up for it
Maybe this article will help: How To Draw a Custom Window Caption[^]
With a different size caption you'd probably want to handle the WM_NCHITTEST Notification[^]
as well.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the number 3
|
|
|
|
|
That was pretty funny.
|
|
|
|
|
Yes,but only a little.Who mede the two words so simulated!
But I remain want someone would help me.
|
|
|
|
|
RegisterServiceProcess function is available only for 98 and me... do any one know the function equivalent to registerserviceprocess for using in win32 api applications ???
|
|
|
|
|
9x "services" and NT services are completely different animals. There are lots and lots of articles here and on MSDN about writing NT services.
|
|
|
|
|
What is the significance of operator new? why is it used sometimes instead of new operator?
|
|
|
|
|
If you get a good, new C++ book then you can find answers to the above questions (and to many others of the millions you posted before).
you can try to (m)alloc (ate) a bit amount of your money to buy a good C book too.
This can help you to delete some of the naive questions you're about to post and make us free to answer to other people.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I think he is simply looking for answers to his homework assignments.
|
|
|
|
|
Hence he has a lot of homework!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
tom groezer wrote: What is the significance of operator new? why is it used sometimes instead of new operator?
Because both are not the same
|
|
|
|
|
Well I;m asking these questions after reading Scott Meyers. he intent is to get a better clarity. I'n sure u guys too went to school and asked questions before becoming what u r now . You can ignore if you do not want to answer.
|
|
|
|
|
tom groezer wrote: Well I;m asking these questions after reading Scott Meyers. he intent is to get a better clarity.
There are a lot of other good books...
Try to code a bit too.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
The new-operator allows you to do other things before or just after the allocation of the memory and before the call the the constructor.
You can for example use the new-operator to create ("new") objects in a different memory scope.
I have used this to work with my own memory manager located on stack.
codito ergo sum
|
|
|
|
|
If you're asking what the difference is between "operator new " and "the new operator", there is none. Just two ways of referring to the same thing.
|
|
|
|
|
I'm stuck!
Ive created and application using C++, openGL and SDL and now want to release it for use on windows.
Thing is I cant seem to find a simple way to do this. Ive been on MSDN which give tutorials on ClickOnce and Windows installer deployment but dont really understand what I want to do.
Could anyone tell me the or give me some pointers on what steps I should take so that I am able to get my program in a format which I can distribute to whoever I want?
Any help would be appreciated
kevin
|
|
|
|
|
Kevin Brydon wrote: Could anyone tell me the or give me some pointers on what steps I should take so that I am able to get my program in a format which I can distribute to whoever I want?
Go to the search field above
Type OpenGL into the field
Push the button Go!
|
|
|
|