Hmmmm, for as much as this software costs, I'm not so sure I'm sold on
it (using the professional version).
This code here:
------------------------------------
#include <string>
#include <iostream>
using namespace std;
int mystrcmp ( const char * src, const char * dst);
int main(int argc, char* argv[]){
--> int i = 90;
const char *s1;
const char *s2;
s1 = "Helli";
s2 = "Hello";
i = mystrcmp(s1, s2);
cout << i << endl;
cin >> i;
....
---------------------------------------
I set the breakpoint at the arrow, but when I select debug - start
debugging, the breakpoint moves down to the function call?????? Also,
the "Locals" window shows the variable i to have a value of '2' at
this point, and it stays that way. WTF????
--------------------------------------------------------------
argc 1 int
+ argv 0x00333360 char * *
i 2 int
---------------------------------------------------------------
FWIW: The command window shows the correct value (-1) for i via the
cout statement....
Again, open to any suggestions....
Thanks,
Markus
David Lowndes - 22 Jul 2007 14:00 GMT
>Hmmmm, for as much as this software costs, I'm not so sure I'm sold on
>it (using the professional version).
[quoted text clipped - 3 lines]
>the "Locals" window shows the variable i to have a value of '2' at
>this point, and it stays that way. WTF????
Markus,
The symptoms you describe are typical when debugging the release
(optimised) version of a project. Is that perhaps what you're doing -
or have optimisation set for the DEBUG configuration?
Dave
Markus - 23 Jul 2007 00:26 GMT
>>Hmmmm, for as much as this software costs, I'm not so sure I'm sold on
>>it (using the professional version).
[quoted text clipped - 11 lines]
>
>Dave
Dave,
The toolbar/configuration manager claimed that I was in Debug mode,
however going into "Project - <projectname> Properties ... -
Configuration Properties - C/C++ - Optimization" saw Optimization set
to Maximum Speed (/O2). I set it to Disabled (/Od) and whala, I can
debug at will :)
Thanks!
Markus
David Lowndes - 23 Jul 2007 08:28 GMT
>The toolbar/configuration manager claimed that I was in Debug mode,
>however going into "Project - <projectname> Properties ... -
>Configuration Properties - C/C++ - Optimization" saw Optimization set
>to Maximum Speed (/O2). I set it to Disabled (/Od) and whala, I can
>debug at will :)
Great, I'm glad that helped.
Dave