|
Oh what happend for your thread I give you 5 but I think it needs to repair.
|
|
|
|
|
Thanks my friend.
Anyway I don't bother if people don't appreciate my humour.
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
|
|
|
|
|
You made a mistake in the default constructor. Can you spot it?
BTW: The correct method is
class aa
{
public:
aa():x(5)
{
}
};
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
|
|
|
|
|
Thank you Pallini.I got it...
But i found this code can't work.
class aa
{
public:
aa():x(5)
{ }//...
};
it said x(5) is not a base class.
Thanks once again!
If we dream, every thing is possible!
|
|
|
|
|
it's because in this class, you don't define a x member...
|
|
|
|
|
In my sample
was the concise notation for
aa(int t)
{
x = t;
}
void print()
{
cout << x << endl;
}
private:
int x;
};
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
|
|
|
|
|
Is This program working ???
cout>>x>>endl;
cin<<ch;
try using debuging than you find that why x is not giving right output
#include "stdafx.h"
#include <iostream>
using namespace std;
class aa
{
public:
aa(int t = 5)
{
x = t;
}
void print()
{
cout<<x <<endl;
}
private:
int x;
};
int main(int argc, char* argv[])
{
aa t;
t.print();
cout<<"---------------------"<<endl;
aa t1(4);
t1.print();
char ch;
cin>>ch;
return 0;
}
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
modified on Thursday, June 5, 2008 3:41 AM
|
|
|
|
|
Shilpi Boosar wrote: cout>>x>>endl;cin<<ch;
you're not serious, are you ?
when you don't know what you're talking about, please avoid posting crap, that will avoid the question poster to be confused at last.
|
|
|
|
|
Sorry toxcct.It's my fault.
I have edited my post.
Thanks youtoxcct.
If we dream, every thing is possible!
|
|
|
|
|
I think now you got the answer why i write that code.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
nope. i still don't understand why you used the wrong operators...
cout use <<, not >>
|
|
|
|
|
Actually he write the wrong code and I just do write his wrong code to explain him where he is wrong. I just explain him that his code is not working. LOL
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Thank you very much, Shilpi.
If we dream, every thing is possible!
|
|
|
|
|
Most Welcome
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Thans Shilpi.
I'm so sorry.It's my fault.
I have edited my post...
If we dream, every thing is possible!
|
|
|
|
|
Its ok dealon He also dont know about this.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
How to hide and show the radio button at run time?
e.g on button click, hide/show radio button.
|
|
|
|
|
ShowWindow(SW_HIDE) and ShowWindow(SW_SHOW)
|
|
|
|
|
Can any one gv one example
|
|
|
|
|
Consider IDC_RADIO is the control ID of your Radio buton.
So for hidig use the following
GetDlgItem(IDC_RADIO)->ShowWindow(SW_HIDE);
For showing the hidden control use the following
GetDlgItem(IDC_RADIO)->ShowWindow(SW_SHOW);
akt
|
|
|
|
|
CWnd *pRadioBtn = GetDlgItem(IDC_RADIO1);
pRadioBtn->ShowWindow(SW_SHOW);//SW_HIDE for hiding.
If you have control variables added as class members.
m_btnRadio1.ShowWindow(SW_SHOW);//m_btnRadio1 is control variable associated with IDC_RADIO1.
Regards,
Sandip.
|
|
|
|
|
Oh you want to use a function is this hard to use GetDlgItem(IDC_RADIO1)->ShowWindow(SW_SHOW); ?
|
|
|
|
|
pleaaaaaaase !
this has already been said.
why would you re reply it again ?!
|
|
|
|
|
No it was not reply,he or she needs to a line code?
|
|
|
|
|