|
puvancooldude wrote: I have not study those things yet
What have you studied? Biology?
|
|
|
|
|
Not yet study encryption technique using the X-OR bitwise operator (^)...
|
|
|
|
|
Encryption specifics aside, you indicated earlier, "So i have no idea how to start."
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
puvancooldude wrote: Actually its an assignment from my University. I have not study those things yet. So i have no idea how to start. Can u help me out here..
no.
There are so many wrong answers in there...
1- University ? what courses do you have ?
2- Did you attend your classes ?
3- Did you do any exercises your classes set up for you ?
4- Did you asked questions to your teacher/teaching assistant if you did not understand the topics ?
5- ...
This signature was proudly tested on animals.
|
|
|
|
|
Electronic and communication engineering. M attending the classes now. Yup m doing the exercises but the topic that involve this question is not yet being thought. My lecturer ask me to try study first by own before he teach the topic. The due date is 2 weeks from yesterday. So m trying to study by own first...
|
|
|
|
|
puvancooldude wrote: So m trying to study by own first
Asking other people to complete your assignment does not count as studying.
|
|
|
|
|
Ok my friend... let me tried out first, if i stuck then only i refer back here... I get what you Mean. Thanks...
|
|
|
|
|
Good answer; anyone who needs help with their own work should get lots of help here. Only those too lazy to try get ignored.
|
|
|
|
|
First you don't use VC6 to compiling this code,you can guess the result that will call several Construction and Destruction,at last try to compiling it:
#include iostream.h
class A
{
public:
A()
{
cout<<"Constitution..."<<endl;
}
~A()
{
cout<<"Destruction...."<<endl;
}
};
A foo(A a)
{
return a;
}
int main(int argc, char* argv[])
{
A a;
foo(a);
A b = foo(a);
return 0;
}
why is 1 Counstruction and 5 Destruction ?
thanks for you reply !
Best Reguards !
|
|
|
|
|
Because your code only calls the default constructor once and several times the copy constructor (for which you didn't supply any specific function, so a default will be generated by the compiler).
If you supply a copy constructor the same way you provided a default constructor, you would see that both count matches.
modified on Thursday, November 12, 2009 9:20 AM
|
|
|
|
|
|
Damn... Cédric-The-Fast-Guy!
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I stole some monkeys from Rajesh. See, he's not that efficient anymore
|
|
|
|
|
That's interesting !
thanks for you reply !
|
|
|
|
|
wangningyu wrote: why is 1 Counstruction and 5 Destruction ?
Because default constructor is not the unique constructor, try:
#include <iostream>
using namespace std;
class A
{
public:
A()
{
cout<<"Construction..."<<endl;
}
A(const A & a){cout<<"Copy Construction..."<<endl;}
A & operator=(const A & a){cout<<"Assignment operator..."<<endl;}
~A()
{
cout<<"Destruction...."<<endl;
}
};
A foo(A a)
{
return a;
}
int main(int argc, char* argv[])
{
A a;
foo(a);
A b = foo(a);
return 0;
}
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Ok, so I have been trawling the web to try and find an answer to this, but to no avail.
Basically, I have a DirectShow filter (well 2) which will allow me to configure a Hauppage WinTV USB adapter (though I doubt the specific filter is 100% relevant to answer the question) to use PAL (I) and to set the source as Composite In. So far, I have found ways to display a filter's property page, and to change the settings of a DMO filter, but not enumerate and change the properties of a non DMO source filter.
The reason for needing to do this is that both filter options seem to reset with Windows, meaning that our source becomes NTSC and Tuner In, rather than Pal-I and Composite In. The filters are classed as a Video Capture Source (WinTV HVR-900H Capture) and a WDM Streaming Crossbar Device (WinTV HVR-900H Crossbar), but the ability to change any property of any filter sans a GUI will be a step in the right direction
I am using a .Net wrapper to play with the filter graph through c#, but have limited knowledge of COM interop (thus the wrapper). If you know how to go about this in C++ then I'll do the code rearranging to C#.
What's the easiest method to go about this?
|
|
|
|
|
My project is about data acquisition through USB port and show the data on PC monitor in graph.So I want to implement the queue to keep the data from USB port before send it to show on graph or save it to file.
Does MFC has the class for create or managing the queue?
|
|
|
|
|
I don't really like the MFC container classes (but that's just my opinion), but you could check the std::queue (from the STL).
|
|
|
|
|
Hi all,
I have a combo box. I have created it by declaring CComboBox m_comboBox; at MainFrame class and
if(!m_comboBox.Create(CBS_DROPDOWN | CBS_SORT | WS_VISIBLE |
WS_TABSTOP | WS_VSCROLL, rect, &m_wndToolBar, ID_COMBO))
{
TRACE(_T("Failed to create combo-box\n"));
return FALSE;
}
But the text size very small. How can i increase the size of this text.
Thanks
|
|
|
|
|
Shaheen.India wrote: How can i increase the size of this text.
Have you tried using the combobox's SetFont() method?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
hello
i need a programme In C how to convert Hexadecimal to decimal and end of programme with @ plz help me
|
|
|
|
|
Hexadecimal and decimal are just different ways of representing the same number, so what's the conversion you're looking for?!
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
learn about scanf and printf
--
Si dos montan un caballo, uno debe ir detrás.
|
|
|
|
|
Do you need to convert an hexadecimal representation of a number (i.e. a string, like "5f" ) to an int value? If the answer is yes then you may try strtol [^], for instance:
int i = strtol("5f", NULL, 16);
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I use the code "Bitmap::FromResource(HINSTANCE, WCHAR)" to load the bmp pic form res and then to fill a rectangle.but can not get a bitmap.
My project is mfc project. so my first question is how to get hte handle of the HINSTANTCE and the second is the wchar parameter, I use "MAKEINTRESOURCE(pResId)" to get he pic name, but get a blank.
and why? whether the gdi+ need more configuration or any other reason.
below is my the whole code
hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(pResId), RT_BITMAP);
CString src = MAKEINTRESOURCE(pResId);
int strLen = 0;
strLen =src.GetLength();
WCHAR* ch = new WCHAR[strLen];
wcscpy(ch, CT2CW(src));
Bitmap* pBitmap = Bitmap::FromResource(hInstResource, ch);
if(!FindResource(hInstResource, src, RT_BITMAP))
{
AfxMessageBox("Fail load pic!", MB_OK, 0);
}
graphics.DrawImage(pBitmap, 75,35);
TextureBrush* pTextureBrush = new TextureBrush(pBitmap, WrapModeTileFlipY);
graphics.FillRectangle(pTextureBrush, 50,300,200,80);
Color m_penColor(233,100,54);
Pen pen1(m_penColor, 1);
graphics.DrawRectangle(&pen1, 50,300,200,80);
|
|
|
|