|
hi
plz help me
i don't know how i can create a hidden process
or show a hidde process in the process list
thanks alot
|
|
|
|
|
Hello All ?
can anyone please tell me what's wrong with following code?
<code>class A
{
public:
A(const string& s)
{ }
string f()
{
return "hello world";
}
};
Class B : public A
{
private:
string s;
public:
B():A(s=f())
{ }
};
void main()
{
B obB;
}</code>
Thank you,
sanket patel
|
|
|
|
|
Is this a quiz? Why don't you first tell us what problem you are having.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
oh I am sorry!
whenever I try to run this code my program crashes.
I dont know what is wrong with it?
sanket patel
|
|
|
|
|
sanket.patel wrote: ...my program crashes.
Where? The term "crash" rarely means anything useful.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am sorry again!!
But I dont know why this code is not executing.
I know there is some problem with my understanding of the code.
so I just want to know that Where I am wrong?
Thank you
sanket patel
|
|
|
|
|
Have you tried:
class A
{
public:
A() {}
A(const string& s) {}
string f()
{
return "hello world";
}
};
class B : public A
{
private:
string s;
public:
B()
{
s = f();
}
};
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank you David!!
the code you show is working fine!
so can you please explain me where I was wrong ?
sanket patel
|
|
|
|
|
In class A, does it still crash if you make the f() method static? You are using A's method before A is ctor'ed. It looks like it shouldn't matter, but who knows, maybe some static consts are not available until after the first inst of the class is created? Sounds doubtful, doesn't it.
|
|
|
|
|
Thanks NealAB,
Yeah I got your point!
I think that is only happening. I was trying to use A's method before it was created.
Thanks again...
sanket patel
|
|
|
|
|
Hi
Its a simple question of which i am not gettin answer in google.
i.e EditBox->Text.c_str()
What does above code says. I am more confused aboue .c_str part.
Can any one shed some light to it.
Thanks in advance
|
|
|
|
|
Software_Specialist wrote: What does above code says. I am more confused aboue .c_str part.
c_str() is a method of the basic_string class.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Software_Specialist wrote: EditBox->Text.c_str()
This indicate that,Text is member of EditBox(its datatype) and c_str is member of Text(its data type) , and obvioulsly, you could find out that.
Prasad
MS MVP - VC++
|
|
|
|
|
Hi there,
I'm unfamiliar with C++. Onli done VB before.
If I'm trying to create a form that has an embedded media player(any version) in C++, Should i use MFC or MS .NET form for C++? Is there an specific purpose for each usage? i.e MFC/C++?
And do i require media player SDK in the project?
Please advise. Thanks.
Your expertise is appreciated.
Regards,
Brendon
|
|
|
|
|
You should be able to drop the WMP ActiveX control onto the dialog template like any other control.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have read about the Intel Threading Building Blocks vs. Windows threads.
http://www.codeguru.com/cpp/misc/misc/threadsprocesses/article.php/c13533__2/
http://www.devx.com/go-parallel/Article/33270
Personally I am concerned about using vendor-specific codes. It could mean lots of work for later on reengineering the code to fit an AMD processor. Just curious about whether there is anyone really using TBB? Would you mind sharing your precious experience with us?
Thanks!
|
|
|
|
|
suppose we are having three exes which contains a package to be installed(each exe). how to run this one after the other ie after the complete installation of one exe the other should start
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Use the CreateProcess() /WaitForSingleObject() pair.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi guys
I was wandering where I have to put this...
-----------------------------------------------------------------------
int ret=AfxMessageBox("You will exit the program.\nContinue?",MB_YESNO);
if (ret==IDNO) return ;
(someone more is needed ?)
-----------------------------------------------------------------------
...in my SDI application when someone clicks on the right upper Cross (standard close button) of my app.
Thanks in forwarding.
Dr.Pi
|
|
|
|
|
Have you considered handling the WM_DESTROY message? This will handle all methods of your app closing ("X", Alt+F4, File/Exit).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In my CFormView? In my App?
I've tried in my CFormView but the app is closing anyway.
I miss something to do?
Dr.Pi
|
|
|
|
|
doctorpi wrote: In my CFormView?
Yes.
doctorpi wrote: I've tried in my CFormView but the app is closing anyway.
Are you still calling the base-class implementation. What does the OnDestroy() method look like?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
How about in response to WM_SYSCOMMAND where wParam==SC_CLOSE?
This should be done in the app main window, wherever that is.
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Override the WM_CLOSE message (OnClose) in your MainFrame class, and put your code it there. It will catch the X in the uppoer right corner, as well as Alt-F4, or an attempt to close from the task manager.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
It helps a lot, that works fine, thanks.
Dr.Pi
|
|
|
|