|
James R. Twine wrote: Add code that actually deos something with it (pass it to _itot(...) for example) and see if the breakpoint works then.
Doesn't assigning it a value constitute "doing something with it?"
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
It should, but I know that I have seen odd things in the debugger with values that are not otherwise used. Basically, if the release compiler would optimize it out, the debug compiler just might, too.
Odd, I know. Welcome to VC++ 6.0!
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
I do have code that is actually doing things, and tried the breakpoints there too. That was assignment statement was just a line , one of many . On some lines it works, on others not, its bizarre. Yes, I am in release mode but I have it set up to allow debugging, and its always worked.
thanks for the input,
sb
|
|
|
|
|
I run into this problem all the time. Out of exasperation, I have found the following fail-safe approach:
1. Close the project.
2. Go into the project directory and delete the .NCB and the .ASP files
3. Re-open the project and re-build
Everything should be straightened out now. This may seem like hitting a fly with a sledge hammer but I got so sick of this happening and I found that this just plain works.
Note: I have found that it happens most often after I have used any revision control system (like SourceSafe). If you have inserted key words into the header of your code files (like "$Log:" or "$History:"), it will displace the code downward and desynchronize it with the debugging information. It does not seem to update the timestamps on the source files, however, so the debug information files do not get rebuilt. So you have to force VS to rebuild them by making them disappear...
Cheers,
Mark
|
|
|
|
|
hmmm....deleting the ncb file and rebuilding all didn't do it. What is the aps file you mention? This is a VC 6 project , is there an aps file?
thanks,
sb
I was so sure the ncb file trick was going to work!
|
|
|
|
|
Yes, its VS6.0 I'm talking about and I always find a file with a name the same as my project and an extension "aps". If memory serves, I also delete the "opt" file as well. I have never bothered to take the time to see which of these 3 files is really responsible. It doesn't matter because they are entirely re-buildable and it doesn't take long.
If this doesn't work then you should check your optimization settings as was previously advised by another respondant.
Cheers,
Mark
|
|
|
|
|
One other thing: Make sure you perform a clean re-build after deleting the files, not just a build-any-out-of-date...
Mark
|
|
|
|
|
ns wrote: What is the aps file you mention?
I think it is an APp Studio file.
ns wrote: ...is there an aps file?
Yes, there very well could be.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
<br />
#include <stdlib.h><br />
#include <stdarg.h><br />
#include <stdio.h><br />
<br />
int maxof(int, ...) ;<br />
void f(void);<br />
<br />
main(){<br />
f();<br />
exit(EXIT SUCCESS);<br />
}<br />
<br />
int maxof(int n_args, ...){<br />
register int i;<br />
int max, a;<br />
va_list ap;<br />
<br />
va_start(ap, n_args);<br />
max = va_arg(ap, int);<br />
for(i = 2; i <= n_args; i++) {<br />
if((a = va_arg(ap, int)) > max)<br />
max = a;<br />
}<br />
<br />
va_end(ap);<br />
return max;<br />
}<br />
<br />
void f(void) {<br />
int i = 5;<br />
int j[256];<br />
j[42] = 24;<br />
printf("%d\n",maxof(3, i, j[42], 0));
}
~~~@@@###EZRA###@@@~~~
|
|
|
|
|
EzraYap wrote: printf("%d\n",maxof(3, i, j[42], 0));// Anyone can explain this by step-by-step?
The maxof() function is called, and its return value is then sent to printf() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i am looking for a way to access a mySql database into a c++ program any help would be great
amy
|
|
|
|
|
You can use ODBC or ADO to name a few. See here for more.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
|
And see Database on www.codeguru.com
|
|
|
|
|
Hi!
I need to find a simple efficient way of finding the "order" of a double or float.
By "order", I mean the power of ten to which a number would be expressed in standard mathematical notation.
The function is necessary for a matrix scaling calculation in which a matrix of doubles are scaled to the order of unity, and at later time scaled back to their natural values.
Does anyone know of a function that takes a double and returns it represented as a number with a decimal place after the first digit, and a power of ten?
Thanks
--
Mike
|
|
|
|
|
Is log10() really that bad?
|
|
|
|
|
perfect. Just what I needed.
Sorry for stupid quetsion.
--
Mike
|
|
|
|
|
No questions are stupid. Everything is hard until you know how to do it. (...and some things are hard even when you know how to do them.)
|
|
|
|
|
Hi all,
i want to build an executable, wich take in parameter a path to another executable. My executable add a protection like a password with a window or an expiration time out. My executable build a new executable with new protections.
This is my idea but i don't find on a network some tutorials or group to help me
If anyome has done a similar projetc or can help me ...
Thanks
|
|
|
|
|
What framework are you using? MFC, SDK or plain C++ etc
|
|
|
|
|
|
OK, To retrieve command line information MFC provide the class CCommandLineInfo that you can derive your own class from
To get info about specific command line parameters override the ParseParam method, it's prototype:
<br />
void ParseParam( const char *pszParam, BOOL bFlag, BOOL bLast );<br />
NOTE: Call CCommandLineInfo::ParseParam( pszParam, bFlag, bLast );
at the start of your implimentation of this method
If bFlag is true then pszParam will contain the character representing the parameter type:
example parameter: -f "foo" -b "bar"
For the above line, ParseParam will be called 4 times. The first time, bFlag will be true and pszParam will contain f. The second time, bFlag will be false and pszParam will contain foo and so on as the process is repeated for the b param.
Regarding starting your app from within the parameter reeiving app, use:
ShellExecute or CreateProcess.
Tom
|
|
|
|
|
Hi,
I have a .wmv file and a .wav file. I want to add/connect the audio (.wav file)to a .wmv filw. How can I achive this?
Regards,
Hemant.
|
|
|
|
|