473,471 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

can't display multi-arrays variable in watch window!

Tau
look my simple code below(vc8):

double ends[2][3];
ends[0][2]=8.3;

when i debug it, the variable ends[0][2] cannot be displayed in the
watch window.
it just said "error: index '0' out of bound for pointer/array 'ends'".
why would this happen? Is it a bug of VC8?

Thanks in advance!

Jan 11 '06 #1
6 1886
you have to show us the context of your example.
a watch window can only show you global variables, and variables that are
currently in scope.

in the following example i have added ends[0][2] to my watch window. i only
get a value there as long
as i am debugging the function 'testje'. as soon as the debugger steps out
of that function, i get an error in my watch
window because the current scope does not see the variable 'ends'.

other than that, quickwatch and the watch window work fine with the code
example you supplied.

#include "stdafx.h"

void testje(void)
{
double ends[2][3];
ends[0][2]=8.3;
}

int _tmain(int argc, _TCHAR* argv[])
{
testje();
return 0;
}

kind regards,
Bruno.

"Tau" <Ta*******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
look my simple code below(vc8):

double ends[2][3];
ends[0][2]=8.3;

when i debug it, the variable ends[0][2] cannot be displayed in the
watch window.
it just said "error: index '0' out of bound for pointer/array 'ends'".
why would this happen? Is it a bug of VC8?

Thanks in advance!

Jan 11 '06 #2
Tau
Sorry for my not describe the problem correctly...
my project is based on C++/CLI and using VS2005

it cannot display in watch window...

// MyCppCLI.cpp : main project file.

#include "stdafx.h"

using namespace System;
int main(array<System::String ^> ^args)
{
double ends[2][3];
ends[0][2] = 8.3;
return 0;
}

Jan 11 '06 #3
bizarre. it seems to work fine for 1 dimensional arrays.
i think this is a bug.

kind regards,
Bruno.

"Tau" <Ta*******@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
Sorry for my not describe the problem correctly...
my project is based on C++/CLI and using VS2005

it cannot display in watch window...

// MyCppCLI.cpp : main project file.

#include "stdafx.h"

using namespace System;
int main(array<System::String ^> ^args)
{
double ends[2][3];
ends[0][2] = 8.3;
return 0;
}

Jan 11 '06 #4
Tau
I tried this with VS2003 and Managed C++, it has errors too.
This bug has been existing for such a long time and no one find out?
strange....
Maybe we should email to Bill? :-)

Jan 12 '06 #5

This might help:

The C++ expression evaluator uses C#-style syntax for multidimensional
arrays. For example:

c[0,0]

Using normal C++ syntax generates an error:

c[0][0] error: index '0' out of bound for pointer/array 'c'

Its just a result of efforts of MS to make c# as a monopolic PL. :)

Tau wrote:
*look my simple code below(vc8):

double ends[2][3];
ends[0][2]=8.3;

when i debug it, the variable ends[0][2] cannot be displayed in the
watch window.
it just said "error: index '0' out of bound for pointer/array
'ends'".
why would this happen? Is it a bug of VC8?

Thanks in advance! *


--
segmentation_fault
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Mar 17 '06 #6
Tau
It still cannot work...
see the result:

ends[0,0] {Length=0} double[]
ends[0,1] {Length=0} double[]
ends[0,2] error: index '0,2' out of bound for pointer/array 'ends'

Mar 28 '06 #7

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

Similar topics

1
by: Deepak | last post by:
hello Frendz, 1.I want to display a tool tip for each item in multi select box(list box) in a web page. 2.i want to enable the horizondal scroll for the list box. if any genius knows the...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
6
by: radnoraj | last post by:
Hi, I am sucessfull in redirecting console output to a file. but in this case nothing is displayed on the console, cout output is written to file without display. how do write the output to...
4
by: Christopher Nelson | last post by:
I have a multi-page site that I want to be able to resume at the same page if the user leaves and comes back later (say, days later). I'm thinking that I'll set a cookie as each page is displayed...
2
by: Patrick Fisher | last post by:
Hi To display a message when a user attempts to edit a record in a multi-user environment where a forms Record Locking is set to Edited Record and another user is editing a record, is difficult...
9
by: tomrmgc | last post by:
Here is the problem we've encountered. An application that used to successfully display Japanese Kanji characters no longer does so when recompiled with 7.1 When compiled with the 6.0 compiler,...
3
by: Bob | last post by:
Thinking two things, 1- Creating a userControl -yeah you guessed it, a multi column drop down combobox - I've looked at several articles and did not find what I need, one that's bindable and that...
2
by: Ivan | last post by:
I have a class Foo which have two property. I have a thread that do some process and update class Foo int B. I have a datagridview on main form. this datagridview data source to this class Foo and...
1
by: ashwath | last post by:
Hi, I am relatively new to Windows forms, i am using a listbox to show items in Compact Framework 2.0. I want to display something of this sort Name: John ...
2
by: Dale | last post by:
Access 2003 I have an access database used for scoring a high school sporting event. Data is entered as scores are turned in from the different events throughout the day. I would like 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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.