|
I think that this _fpclass is a nice idea,
but it's not too clear to me how to realize it.
May i write in the ascii file "nan", then load it as
a double and test it with _fpclass() ?
|
|
|
|
|
write (simplest solution) - pseudocode:
if (_finite(x)) write("nan"); else write(x);
(write is your filewriting function)
read accordingly:
string s = read(next_element);
if (s == "nan") { ... it's a nan... }
else x = strtod(s,...);
the actual code depends a lot on what methods and libraries you use.
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
I have created a project in which i have 3 dialog.i need to pass and take the value from one dialog to another.. is it possible??
thanks in advance
|
|
|
|
|
|
Jun Du wrote:
Yes.
Nice
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
There are almost countless ways to do this.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Quite easy in fact...assuming you have the 3 Dialogs decended from an MFC class
<br />
<br />
CDialog1 dlg1;<br />
CDialog2 dlg2;<br />
CDialog3 dlg3;<br />
...<br />
if(dlg1.DoModal())<br />
...
if(dlg2.DoModal())<br />
...
if(dlg3.DoModal())<br />
...
<br />
dlg1.m_iMyValue = dlg2.m_iMyValue = dlg3.m_iMyValue;<br />
dlg2.m_iOtherValue = dlg1.m_iMyValue + dlg3.m_iSomeValue;<br />
dlg3.m_iAnyValue = dlg1.m_iThisValue * dlg2.m_iBigValue;<br />
<br />
Of course, to be truly object oriented, you'd probably add functions to get the information since the data should normally be declared protected/private. At any rate, that's a real simple example of how to do it. I hope that helps, let me know if you need any additional information.
|
|
|
|
|
san_nat wrote: have created a project in which i have 3 dialog.i need to pass and take the value from one dialog to another..
Use WIndow Messaging for same! most easiest way to do so!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Yes you can use from variables in dialogs or you can use from for example if you have two dialog
CMainDialog and ClocalDialog now if you need to a variable in maindialog see
CMainDialog* m_Main = (CMainDialog* )GetParent(); m_Main->variables or functions
whitesky
|
|
|
|
|
Hi all,
Is there anybody able to use National Instruments Measurement Studio ?
I need to plot just a few points (no line) on a plot but i don't know how.
Elsewhere is there a way to do that using MFC ?
Thanx,
Desmo16.
|
|
|
|
|
Desmo16 wrote: Elsewhere is there a way to do that using MFC ?
Yes, you could do it fairly easily with MFC/GDI. Have you used MFC before?
Best,
Jun
|
|
|
|
|
Jun Du wrote:
Yes, you could do it fairly easily with MFC/GDI. Have you used MFC before?
Measurement Studio is far more Convient for drawing graphs and related thing!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Desmo16 wrote: Is there anybody able to use National Instruments Measurement Studio ?
measurement studio has rich documentation present at there site! visit NI.com for more INfo
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Could anyone plz tell me how to ( Programmatically ) terminate / release / kill .... ( whatever ) a dll, so that one program doesn't hold on too the thing the whole time.
Plz
Thanx
Programm3r
|
|
|
|
|
Isn't enough with "FreeLibrary"?
Marc.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
|
Search for FreeLibrary function in your/online help files.
Marc.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
if this dll was loaded using LoadLibrary, then FreeLibrary should do the trick.
if this dll was loaded by the exe (the compilation was with the lib) , then when the exe unloads the dll.....
hope this helps
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Use FreeLibrary function
see MSDN for more information
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
|
Programm3r wrote: My bad .... Thanx
what?
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
<blink>My Blog | Understanding State Patte
|
|
|
|
|
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
I ran into a problem with the getline, which is a known bug in Visual C++ 6.0 and found the solution was to change the system header file string, so I'm trying to figure out how to make the change take effect (I suppose I have to recompile it somehow, but I'm having a lot of trouble figuring out just how to do that). If someone could tell me where to look to make the change take effect, I would appreciate it!
Thanks!
Richard Alley
Student/Software Engineer
|
|
|
|
|
What you are attempting is very risky, and hardly ever necessary. Even if you did manage to recompile the MFC DLLs, they would be incompatible with those on the target machine. Why don't you just derive a class from whatever class getline() belongs to? Then you can override the getline() method.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
He isn't talking about the MFC dlls. He is referring to the old bug in the standard header file.
I don't recommend editting it yourself. You can download the patched library (it is just header files) from Dinkuware's site that fixes that issue and several others. Additionally, you should try to use the string file instead of string.h (which is marked as deprecated).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|