Hi all,
I'm using Microsoft Visual C++ 6.0,
I would like to see, debugging my project, all the elements of my dinamic
objects....
I have a dinamic array and a STL vector and I need to know the fields values
at a specific position, but in the Watch windows I can only see the first
element...
I tried putting in the watch window
vector_name
vector_name[k]
vector_name[5]
vector_name.at(k)
vector_name.at(5)
vector_name[5].field_name
....
etc....
but there's no way...
could anyone help me?
thanks... 6 2017
gp wrote: Hi all,
I'm using Microsoft Visual C++ 6.0, I would like to see, debugging my project, all the elements of my dinamic objects....
I have a dinamic array and a STL vector and I need to know the fields values at a specific position, but in the Watch windows I can only see the first element...
I tried putting in the watch window vector_name vector_name[k] vector_name[5] vector_name.at(k) vector_name.at(5) vector_name[5].field_name ... etc....
but there's no way...
could anyone help me? thanks...
You'll have to dig into the implementation of their std::vector, but I
think it should be something like this:
*(vector_name._First+k)
Cheers! --M
gp wrote: Hi all,
I'm using Microsoft Visual C++ 6.0, I would like to see, debugging my project, all the elements of my dinamic objects....
I have a dinamic array and a STL vector and I need to know the fields values at a specific position, but in the Watch windows I can only see the first element...
I tried putting in the watch window vector_name vector_name[k] vector_name[5] vector_name.at(k) vector_name.at(5) vector_name[5].field_name ... etc....
but there's no way...
could anyone help me? thanks...
<OT newgroups-to-try-in="*microsoft.vc*"> http://www.codeguru.com/Cpp/V-S/tips/article.php/c465/
</OT>
mlimber wrote: gp wrote:
Hi all,
I'm using Microsoft Visual C++ 6.0, I would like to see, debugging my project, all the elements of my dinamic objects....
I have a dinamic array and a STL vector and I need to know the fields values at a specific position, but in the Watch windows I can only see the first element...
I tried putting in the watch window vector_name vector_name[k] vector_name[5] vector_name.at(k) vector_name.at(5) vector_name[5].field_name ... etc....
but there's no way...
could anyone help me? thanks...
You'll have to dig into the implementation of their std::vector, but I think it should be something like this:
*(vector_name._First+k)
OT, but try:
(vector_name)._First,N
where N is the number of elements you think exist in 'vector_name'
(and yes, it is a comma)
/S.
thanks!
(vector_name)._First,N works well with vectors!
do you know how can make the same thing with a dinamic classic array?
(i have a function which takes as parameter "array[]" and I would like to
know every array element...)
"Stefan Näwe" <na*****@atlas.de> ha scritto nel messaggio
news:4g***********@news01.atlas.de... mlimber wrote: gp wrote:
Hi all,
I'm using Microsoft Visual C++ 6.0, I would like to see, debugging my project, all the elements of my dinamic objects....
I have a dinamic array and a STL vector and I need to know the fields values at a specific position, but in the Watch windows I can only see the first element...
I tried putting in the watch window vector_name vector_name[k] vector_name[5] vector_name.at(k) vector_name.at(5) vector_name[5].field_name ... etc....
but there's no way...
could anyone help me? thanks...
You'll have to dig into the implementation of their std::vector, but I think it should be something like this:
*(vector_name._First+k)
OT, but try:
(vector_name)._First,N
where N is the number of elements you think exist in 'vector_name' (and yes, it is a comma)
/S.
gp wrote: thanks! (vector_name)._First,N works well with vectors!
do you know how can make the same thing with a dinamic classic array? (i have a function which takes as parameter "array[]" and I would like to know every array element...)
array[5]
*(array+5)
Both should work. The trick here is that for std::vector, the []
operator is actually an implicit function call. For "classic" arrays,
the [] operator should work as usual in any debugger worth its salt.
Cheers! --M
gp wrote: thanks! (vector_name)._First,N works well with vectors!
do you know how can make the same thing with a dinamic classic array? (i have a function which takes as parameter "array[]" and I would like to know every array element...)
It's the same trick
array,N
The comma is the key.
john This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: dddddd |
last post by:
i need do create simple dinamic site - built mainly
of pictures(they are the only dinamic part).
pictuers differ by the -Location- and by -Time- (in which
they were taken)... so on the index...
|
by: gerd |
last post by:
Hello,
I want to port an MFC Application from Visual Studio 6 MFC application to
Visual C++ 2005 express edition beta.
While building i get following error:
------ Build started: Project:...
|
by: gerd |
last post by:
Hello,
I want to port an MFC Application from Visual Studio 6 MFC application to
Visual C++ 2005 express edition beta.
While building i get following error:
------ Build started: Project:...
|
by: Forecast |
last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully.
: // proj2.cc: returns a dynamic vector and prints out at main~~
: //
: #include <iostream>
: #include <vector>
:
: using...
|
by: Greg B |
last post by:
Created a simple Win32 application (using Visual Studio wizard)...
Am using Visual Studio (Enterprise Edition) 6.0, as well as Service
Pack 5.
At the start of 'WinMain' function, added the...
|
by: Jose Garcia |
last post by:
Hi there,
Can somebody explain me how can i use matrixes with dinamic memory? I
use malloc and free (NOT new & delete). I want to access to the matrix
like Matrix but i don't know how to do that...
|
by: saj14saj |
last post by:
(If there is a better forum to post this in, please let me know...)
I am using Visual Studio 2005. I have a Solution consisting of three
projects:
* A main project "DiscoverNotes" written in...
|
by: javuchi |
last post by:
I just want to share some code with you, and have some comments and
improvements if you want.
This header file allocates and add and delete items of any kind of data
from a very fast array:
...
|
by: jwwicks |
last post by:
Introduction
This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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...
|
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...
|
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...
|
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,...
|
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...
|
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...
|
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,...
| |