|
by: john smith |
last post by:
Hi, when there is a vector<> of pointers to some objects, does calling
resize cause vector to call delete on each object, or is there a memory leak
problem?
for example:
struct base {//some vars; ~base();};
vector<base*> vb;
vb.push_back(new base);
vb.push_back(new base);
|
by: Stefan Höhne |
last post by:
Hi,
as I recon, std::vector::clear()'s semantics changed from MS VC++ 6.0 to
MS' DOT.NET - compiler.
In the 6.0 version the capacity() of the vector did not change with the
call to clear(), in DOT.NET the capacity() is reduced to 0.
|
by: Joe |
last post by:
I have a: vector<string> which contains a few dozen elements.
I want to find the index of the element containing a certain string.
for example:
vector<string> strings;
strings.push_back("abc");
strings.push_back("xyz");
strings.push_back("lmnop");
|
by: Mikhail N. Kupchik |
last post by:
Hi All.
I have a question regarding C++ programming language standard. It
is related to standard library, not to the core language.
Is it portable to instantiate template class std::list<> with
incomplete type? I've seen some STL implementations which allow this
and some others that does not. I did not find any mentioning of this
topic in the standard, maybe I searched not enough thoroughly?
|
by: Anu |
last post by:
Hi,
We have a class that has its own overloaded operator new and whose
prototype seems to correspond to the standard placement new :-
class AppClass
{
public:
operator new (size_t size, void *ctx)
|
|
by: Javier |
last post by:
Hello,
thanks for the replies to my questions.
I have one more:
class A
{
public:
m1() const;
m2();
};
|
by: jacek.dziedzic |
last post by:
Hi!
I need to be able to track memory usage in a medium-sized
application I'm developing. The only significant (memory-wise) non-
local objects are of two types -- std::vector<and of a custom class
simple_vector<that is a hand-rolled substitute for array<>. With the
latter I have code that tracks all allocations and destructions, so I
can account for all the memory.
The question is about std::vector<-- how can I track memory usage
|
by: Rune Allnor |
last post by:
Hi folks.
I have a function that takes an element in a vector as
argument. The naive interface goes as
float computeSomething(const std::vector<float>& v, size_t i)
{
size_t j = i-1;
size_t k = i+1;
|
by: iammilind |
last post by:
I am not able to understand why the 2nd ~Test() is called with different 'this' but the same string value ??
Also why does it give error, if I want to declare Test::Str as a const string member ??
=======================================================
struct Test{
string Str; // Gives error if, you declare const string !
Test(const string s) : Str(s) { cout<<Str<<" Test() "<<this<<endl; }
~Test() {...
|
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: 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: 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: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
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...
|