473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Please help to resolve this mystic problem

Please take a look at the simple console app code below:

#include "stdafx.h"

#using <mscorlib.dll>

using namespace System;

typedef struct {
unsigned long checkSum;
} DATALOG_FILE;

class CLogConfig
{
public:
CLogConfig();
~CLogConfig();

public:
DATALOG_FILE log [16];
};

CLogConfig::CLogConfig()
{
}

CLogConfig::~CLogConfig()
{
}

int _tmain()
{
CLogConfig m_LogConfig;

m_LogConfig.log[0].checkSum = 123 ;
m_LogConfig.log[5].checkSum = 456 ;
m_LogConfig.log[9].checkSum = 789 ;

return 0;
}

I set breakpoint at the beginning of main procedure, run this program in
VS.NET 2003 debugger and debug it step by step. I add
m_LogConfig.log[0].checkSum
values to watch window and observe the following:

The first statement works fine and value 123 assigned to
m_LogConfig.log[0].checkSum

However the second and third statement due to unknown reasons do not assign
values 456 and 789.

Even when I open QuickWatch window and try to change value of variable
m_LogConfig.log[5].checkSum the error dialog "Cannot Change Value" pops up.

Can anyone explain what is going wrong with this code?

Thank you
Nov 17 '05 #1
3 1029
It looks like a bug in the debugger or build tools.

You can use tracing / console output to verify that the application
itself works correctly.

Regards,
Oleg
[VC++ MVP]

Nov 17 '05 #2
You are right. This is debugger bug. Tracing confirmed that all values are
set corectly.

I wonder whether someone in Microsoft will look into this problem or not?

Thanks

"Oleg Starodumov" wrote:
It looks like a bug in the debugger or build tools.

You can use tracing / console output to verify that the application
itself works correctly.

Regards,
Oleg
[VC++ MVP]


Nov 17 '05 #3
Hi Oleg,
You are right. This is debugger bug. Tracing confirmed that all values are
set corectly.


I was able to replicate your problem here. It does happen with VC .NET 2003.

I've runned it under Whidbey Beta 1 too, and the "good" news is that
apparently it has been fixed. ;-)

Fabro
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steve Macleod | last post by:
Hi, Im having a problem with an (apparently) simple little script, which is designed to log on to a POP3 server and list the number of emails. I can log in with username and password, and can...
4
by: mr_burns | last post by:
Hi there, I am tryin to use a $_POST variable but the name of the form element is dynamic. Below is the code I am tryin but is obviously wrong as it isnt working: $abc = $_POST; //isnt...
5
by: Franco, Gustavo | last post by:
Hi, I have a question, and please I need a answer. How can I finalize a thread running with Application.Run (I need the message loop!!!) without call Thread.Abort?. I want to call...
2
by: | last post by:
Help! I'm new to c++, and am breaking my teeth on MS Visual C++ (bundled within Visual Studio .NET 2003). Am trying to link simple c++ code to fortran dlls created in Compaq Visual Fortran (v6.1)....
10
by: Rob Dob | last post by:
Hi, I'm amazed!!! I am using VS2005, I create a new web project, c# and then within the default.aspx form right mouse click and select "View Compnent Designer" , I then select and drag a...
4
by: KK | last post by:
Hello all, I have class 'atr' which is based on templates. My idea was to initialize it two scenarios 1. std::string case 2. other data types I have defined the Init for the above different...
4
by: courtney.machi | last post by:
Hello, I am trying to connect to a remote mysql server through php. Here's the code: mysql_connect("my.hostname.edu", "username", "password") or die (mysql_error());...
7
by: rn5a | last post by:
This is the second time I am asking this question in this newsgroup since I haven't got a solution or response from anyone in my previous post & I need to resolve this issue desperately. Sorry for...
4
by: Tonio Tanzi | last post by:
I have the following problem in a Win 2000 Server + SQL Server 2000 environment and I hope somewhat can help me to resolve it (after many days of useless attempts I am desperate). In my database...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.