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 2039
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: 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,...
| |
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: 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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: 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();...
|
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.
| |