473,761 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
+ 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 1901
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*******@gmai l.com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.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<Syst em::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*******@gmai l.com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.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<Syst em::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 multidimensiona l
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_fa ult
------------------------------------------------------------------------
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
1365
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 solution .pls reply me. regards, Deeps
0
3787
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 and white CCITT4 compressed files (frames) inside the tiff. Every now and then I receive a mixture of black and white CCITT4 and JPEG compressed files, and sometimes just multi-page tiffs with JPEG only. The code runs great when dealing with the...
6
4622
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 console as well as to file, my code is as below, ======================================================================= #include <iostream.h> #include<ostream> #include<sstream>
4
2431
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 and when the main/first page displays, I'll look for the cookie and open the page it names. If a new version of the site omits a page that used to exist or if the cookie somehow becomes corrupt, I don't want to display an error when I try to...
2
2506
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 because Access does not trigger an error, I have overcome this problem by trapping the Delete and Backspace key in the KeyDown event of the form and displaying a label on the form saying "If Record cannot be Edited it may be that Another User is...
9
2150
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, both of the following methods are successful in displaying Japanese characters in a multi-line CEdit control on a machine that is fully configured as a Japanese machine (Japanese version of Windows 2000 SP4). The same code, compiled with 7.1,...
3
17244
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 I can use in a datagrid view. 2- Extending the datagridview so that it can be added to the list in the column types when editing columns in the datagridview. I'm really getting PO'd at Microsoft for not including a multi column combobox both a...
2
5019
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 column A binds to string A and column B binds to int B. When i start two threads, the datagridview able to show two rows and updated int B at run time. How? public class Foo { public Foo()
1
9990
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 Email:j...@gmail.com Phone:9817239821 Sex:Male
2
2578
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 display data via multi-media projector in real time, so students & teams know thier status at all times. I am open to ideas about how to achieve this. I have tried reports
0
9377
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7358
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.