|
HI!!!
I have two method...like
void Confwebd()
{
myvariable;
}
void Webdocument()
{
i want to use myvariable value in this method.
}
I want to use myvariable value from void Confwebd to void Webdocument..
How i can use it??
shah satish
|
|
|
|
|
is it possible to write void Webdocument.. inside void Confwebd ??
i am just asking???
In structure also you can declear public variable.
Thank you.
There Is Nothing Right & Wrong
|
|
|
|
|
you have to put outside your variable declaration, I already showed you how, but anyway, see the following piece of code that depicts another method (using a global variable, ugly...)
static int myvariable;
void Confwebd();
void Webdocument();
int main()
{
Confwebd();
Webdocument()
}
void Confwebd()
{
do something with myvariable
}
void Webdocument()
{
do something else with myvariable
}
I hope that, finally, helps...
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.
|
|
|
|
|
Exactly right dude...
i got my solution and i just compare with your solution..Totally same..
Thank you very much for your help..
|
|
|
|
|
|
cpallini wrote: if you have NO class then you have NO methods!!!!
Hmm....I've been told I have no class but I've got LOTS of methods
|
|
|
|
|
Mark Salsbery wrote: I have no class
then you have a lot of functions, not methods
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.
|
|
|
|
|
Mark Salsbery wrote: I've been told I have no class but...
... lots of style
|
|
|
|
|
|
I got a error "LINK : fatal error LNK1104: cannot open file 'dxerr.lib'".
And I am new for both DirectX and Visual studio .Net.
Please help!
|
|
|
|
|
You probably didn't supply the path to your lib file in the project settings.
|
|
|
|
|
But how to do it?
I am not familier with Visual studio .Net!
Please help!
|
|
|
|
|
You should go in the project setting and look for the link catgory and there find an option called "Additional library directory". The exact place depends of your IDE.
|
|
|
|
|
Thank you very much!
I found it and solve the problem!
|
|
|
|
|
I am new in Visual studio.net. I would like to know how to add .lib in it?
Please help!
|
|
|
|
|
what do you mean "add .lib" ?
|
|
|
|
|
I am using visual c++ 6.0. I wish to use the COleVariant::GetByteArrayFromVariantArray member function
but the compiler generates error message : GetByteArrayFromVariantArray is not a member function of COleVariant. Why could this happen?? Is this function available only in VC++ 2005??
Is there any way to retrieve a byte array from variant array??
Thanks. I will appreciate any help from you.
|
|
|
|
|
weehau wrote: Is this function available only in VC++ 2005??
I think that's the right hypothesis, since I cannot find GetByteArrayFromVariantArray inside Visual Studio 6 Help documentation
hope that helps.
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.
|
|
|
|
|
Hey
I am currently working on an MFC application (using MFC71.dll's) that is passed its intial position and size from the command line.
I attempt to use the function SetWindowPos(&CWnd::wndTopMost, l, t, r, b, SWP_NOZORDER)
in the initinstance function of the application.
The problem is i keep getting assertion failed, which i can ignore but it does not reposition the window.
Any idea of what could be causing this?
Cheers
Dan
|
|
|
|
|
You don't provide information about why the assertion fails, but I'm quite confident that it fails since the window is not a window yet when calling SetWindowPos() from InitInstance() .
Override OnSize() and call SetWindowPos() from there.
Don't forget to add some conditions to control whether the window should on top or not.
Hope this helps
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
|
prasad_som wrote: How ?
What do you mean? Can I get a full sentence, please... :->
I don't get what you're referring to...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
I was confused about this statement,
but I'm quite confident that it fails since the window is not a window yet when calling SetWindowPos() from InitInstance().
Why you feel so ?
It's perfectly constructed window in InitInstance .
Thats why there are calls to ShowWindow and UpdateWindow .
|
|
|
|
|
Ok, now I see what you mean.
The OP did not say anything about at what point he was calling SetWindowPos() from InitInstance() .
At the top of InitInstance() the window has not been created yet and the call will generate an assertion failure.
You can try it by copying the call to ShowWindow() to the top of InitInstance() .
However, I'm referring to VC6 and the OP is using VC7 so this may have changed, but I doubt it.
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
Roger Stoltz wrote: At the top of InitInstance() the window has not been created yet and the call will generate an assertion failure
I know that. But, I wanted to point to your statement.
Anyway, OP seems to be not interested in our replys. Doesn't care to reply to our queries.
|
|
|
|