|
Zac, thanks for help now and in the question that I posted before.
I change this thing to the second way that you said:
BSTR Detach();
Now I have some others, linker compiler errors:
[Linker error] undefined reference to `_ZN9_com_util19ConvertStringToBSTREPKc@4'
[Linker error] undefined reference to `_Z16_com_issue_errorl@4'
[Linker error] undefined reference to `_Z16_com_issue_errorl@4'
What is this man?
Thanks again for the great and big support
|
|
|
|
|
Looks like you might be linking to the wrong library. Is this an application linking with a static library by chance?
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
|
|
|
|
|
Dear sir,
I do know what i do
When I compile my program now i have this error :
Making help file...
Error executing c:\windows\system32\cmd.exe.
paie.exe - 1 error(s), 0 warning(s)
What to do now to correct this error ?
I learn my self
|
|
|
|
|
Does this happen with all projects, or just the one? Does the project actually have a help file?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
THis happens for just one project,
I have help file
|
|
|
|
|
Can you be more specific
whitesky
|
|
|
|
|
My project was working well,
I have created a new form after that i have this error.
From to now i don't understand
|
|
|
|
|
Dear sir,
I do know what i do
|
|
|
|
|
Hello. I have a TabCtrl and am using the TCS_BOTTOM option so that my tabs appear on the bottom, rather than the top. When the project was switched to use a manifest that allows xp controls, the tabs now appear as if they are upsidedown. They are located on the bottom and the text is rightside up, which is good, but they seem to be "attached" to the bottom of the ctrl, rather up into the ctrl.
To word it another way, they seem to have been moved from the top and just placed at the bottom, rather than moved to the bottom AND rotated 180.
Also, the tab selection colour (yellow) appears at the top of the tab rather than the bottom.
Any thoughts on how I can switch that orientation? I've checked the tab ctrl styles, but none of them seem to be what I need.
Thanks for any information.
|
|
|
|
|
|
Hi,
How can i represent in an hand-written ascii file
the not-a-number value ?
Of course i also need to do how can i write a
code capable to recognize that.
Any suggestions ?
Thanx in advance,
Desmo16.
|
|
|
|
|
Are you asking how to tell if a byte in a file is not a number? More specific details would be helpful ...
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
|
|
|
|
|
well , i have an ascii file made like this:
string1 double11 double12 double13
string2 double21 double22 double23
string3 double31 double32 double33
...
Where stringx is the name of a geophysical station
while doublexx are double values measured from the station
When for some reason we haven't the measured value
When i write to a file a number divided by zero
and then i open that file with notepad i found
-1.#IND.
So i supposed that if i write -1.#IND at the place of some
doublexx the code can understand that i mean Not-a-number
when i load it as a double but it doesn't work.
Thanx in advance,
Desmo16
|
|
|
|
|
just put "N/A" or something else, and parse that when you read the file.
it's simpler than second guessing what is "not a number" really is.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
well , i have an ascii file made like this:
string1 double11 double12 double13
string2 double21 double22 double23
string3 double31 double32 double33
...
Where stringx is the name of a geophysical station
while doublexx are double values measured from the station
When for some reason we haven't the measured value
we need to put Not-a-number.
When i write to a file a number divided by zero
and then i open that file with notepad i found
-1.#IND.
So i supposed that if i write -1.#IND at the place of some
doublexx the code can understand that i mean Not-a-number
when i load it as a double but it doesn't work.
Thanx in advance,
Desmo16
|
|
|
|
|
Desmo16 wrote: When i write to a file a number divided by zero
and then i open that file with notepad i found
-1.#IND.
Why not intercept the divide-by-zero error and write 0.0 to the file instead? Would that work, or is 0.0 considered a valid number?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I take it that everything is not preceeded by "string" or "double"? If they are, I would suggest modifying the file format and either use XML or just out the name and then the double values in a delimited file:
Station 1;2.0;1.0;4.5
Station 2;;2.45;9.1
With that type of format, you just load in the line and parse the string by the delimiter (in this case, a ';'). If there is nothing in between 2 consecutive ';'s (or a ';' followed by the end of line), you know that value is invalid.
Avoid divide by zero issues by checking the denominator in your division before doing it.
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
|
|
|
|
|
Scientific software I know prefers to write nan instead of the C++ -1#ind
With VC++, you can use
_fpclass [^] to determine the type (+/. nan, quiet nan, inf). I promote all non-number values to 'nan'.
When reading, you can read a "word" (i.e. everything until the next space), then first check if it is qual to "nan" and handle accordingly.
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
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.
|
|
|
|