by: Steve Hill |
last post by:
Hi,
suppose I have a vector allocated on the heap. Can I use a temporary
(stack based vector) and swap to clear it, or is this unsafe. e.g.
vector<int> *v;
vector<int> tmp;
v->swap(tmp); // is...
|
by: Sayan |
last post by:
How do I distinguish between a heap pointer and a stack pointer?
I want the following to work:
template<class T>
bool isHeapPtr(T* p1,T* p2);//the function I want to write
//...
int a = 5;...
|
by: Jonas Rundberg |
last post by:
Hi
I just started with c++ and I'm a little bit confused where stuff
go...
Assume we have a class:
class test {
private:
int arr;
};
|
by: balu |
last post by:
Hi Gurus
I need a help. Im developing a C++ libaray. I don't
whether user creates object in stack/heap. Is there a
way to find object location?
Balu.N
|
by: Amit |
last post by:
char *str1="amit";
char str2="mehta"
strcat(str1,str2);
It will crash, I feel str1 will be stored in code section. Once memory
is allocated, you cannot change or append into this.
Please...
|
by: Geiregat Jonas |
last post by:
I'm reading Eric Gunnerson's book.
He is talking about the heap and stack, he says you have 2types, value
wich are in the stack or inline or reference types wich are in the heap.
I don't get...
|
by: Nick McCamy |
last post by:
I have a question related to allocating on the stack.
In this program below, are my following assumptions true?
- variable a is allocated on the heap since it's static
- variable b is...
|
by: Robbie |
last post by:
Someone at work asked me this question:
Value types--do they hit the heap or the pile? Well, I was a bit
dumbfounded, because I never heard of the term "pile". I've heard of
heap and stack,...
|
by: gpraghuram |
last post by:
HI All,
Someone asked me the following question and i am not able to get an answer for this.
In c++ how will you restrict
1)object creation in heap
2)object creation in stack
Can anyoine...
|
by: seper254 |
last post by:
Hey I am in the middle of Java and I am having trouble drawing heap stack diagrams from code. I have two that I really need help with.
First code:
public class HEAPSTACK extends ConsoleProgram{...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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: 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: 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,...
|
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...
|
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: 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...
|