|
Try something like this:
------------------------
// CommandLine.cpp : Defines the entry point for the console application.
//
#include "StdAfx.h"
#include <iostream>
#include <iterator>
#include <algorithm>
int main()
{
using namespace std;
int numbers[] = {3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6};
int *pOnePastEnd = numbers + sizeof(numbers)/sizeof(numbers[0]);
cout << "Before sort:" << endl;
copy(numbers, pOnePastEnd, ostream_iterator<int>(cout, " "));
cout << endl;
sort(numbers, pOnePastEnd);
cout << "After sort:" << endl;
copy(numbers, pOnePastEnd, ostream_iterator<int>(cout, " "));
cout << endl;
return 0;
}
Steve
|
|
|
|
|
Why the base class Serialize is called
void CProject::Serialize(CArchive &ar)
{
CObject::Serialize(ar);
if (ar.IsStoring ())
ar << szProjectName;
else
ar >> szProjectName;
}
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
Usually you call the base class's overriden to let him do its job. But as for CObject, its Serialize does nothing so you may omit that call.
--
======
Arman
|
|
|
|
|
because, due to inheritence, your CProject class IS a CObject (I understand here that you created a class CProject : public CObject , right ?).
so, if you serialize a CProject, why would you serialize only the children members ?
|
|
|
|
|
I have made a chat server and I wish to incorporate a webcam service in it.How to include it?Also I do not wish to make it too costly i.e. I wanna make full use of the user bandwidth coz bandhwidth is pretty costly in many countries.
help needed!
Best Regards!
|
|
|
|
|
The basic tasks (one way) are -
Capture the video frames
Compress the video
Transmit the video across the network
Uncompress the video frames
Render the video frames
Which part are you having trouble with?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I need to hash a string using any Hash Algorithm in VS 6 C++ . In .NET, I used SHA1CryptoServiceProvider class , but I'll be happy with any other algorithm in C++ too .
Is there any ?
|
|
|
|
|
|
|
hello,
What is Windows registry?
Where should I look for, for Windows Registry.Is there any link for the same.
Prithaa
|
|
|
|
|
Windows Registry stores settings and options for the OS. It contains information and settings for all the hardware, operating system software, most non-operating system software, users, preferences of the PC, etc. Whenever a user makes changes to Control Panel settings, file associations, system policies, or installed software, the changes are reflected and stored in the registry.
You can go to StartMenu>Run and type regedit to see the registry.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Don't be so lazy, have you heard of google ?
|
|
|
|
|
|
You've just gotta love good old Wikipedia.
Steve
|
|
|
|
|
|
Hello,
Thanks for all your replies.You people are really great and this site really helps me in completing my project.
I hope to answer some of the questions for this site in future.
Right now I just participate passively.
Bye
Prithaa
|
|
|
|
|
I glad you found your answer
|
|
|
|
|
I need to make a dialog in MFC non-movable. There is no property like there is one for Visual Basic. How can it be done?
|
|
|
|
|
modal, or non-movable ? because these are definitely not same !
if you want the later, then check in the dialog editor the style property...
|
|
|
|
|
Changes in style property (popup, overlapped and child) does not seem to affect. What does affect is if the title bar is removed. But we need to have title bar. VB forms can be made non-movable only by setting one property. Is there any corresponding property in Dialogs in MFC?
|
|
|
|
|
but hey, you're not in VB, so don't try to stick to that easy language.
i have a question though. why would you need a title bar if you don't want it to be movable ?
|
|
|
|
|
Have a look at WM_WINDOWPOSCHANGED.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
This event gets the new position. But I am unable to find a way to change it or affect the position changing. If new position is pushed into the position structure it is not accepted. Is there a known solution to this problem?
|
|
|
|
|
Handle the WM_NCHITTEST message.
Check the reply from the base class call and if it is HTCAPTION then return HTNOWHERE;
See below
UINT CNchittestDlg::OnNcHitTest(CPoint point)
{
UINT nReply;
nReply = CDialog::OnNcHitTest(point);
if (nReply == HTCAPTION)
{
nReply = HTNOWHERE;
}
return nReply;
}
|
|
|
|
|
Thanks, it works excellently.
|
|
|
|