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 2036
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.a t(k) vector_name.a t(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.atla s.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_nam e vector_nam e[k] vector_nam e[5] vector_name. at(k) vector_name. at(5) vector_nam e[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 page visitor
should have 2 choices (how the pictures will be arranged)
(1) by time
(2) by location
the webmaster will only copy the pictures in folder
|
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: OSTDLL, Configuration: Debug Win32 ------
Compiling...
StdAfx.cpp
|
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: OSTDLL, Configuration: Debug Win32 ------
Compiling...
StdAfx.cpp
|
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 namespace std;
:
: vector<string>* getTyphoon()
|
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 following two lines:
char* ptr = NULL;
*ptr = 'b';
Built the crashTestApp.exe in both Release and Debug configurations.
| |
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 with pointers and
malloc & free...
If I declare 4 statics matrixs of 576x720, the program brokes down (how
is it posible!?), so i must use dinamic memory (i suppose)...
|
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 C#
* A helper project, set as a /CLR DLL, in C++
* A test project in C#
Unfortunately, the using NotesApiAccessor line in the main project gives the
|
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:
#include <stdlib.h>
#ifndef __LIST_H__
#define __LIST_H__
|
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 beginning CIS student who is struggling to get their programs working. I work in the computer lab at the college I'm attending and I see many students who don't know how to use the IDE for best results.
Visual Studio automatically creates a number of...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |