|
Which destructor is called in which sequence at the end of themain program? Mark Sullivan a �crit : Assume I have the following code structure: class A .... { ..... } class B .... { .... } main () { A a; B b; .... } Both objcts a and b are created at the beginning. But when the main program reaches the end which destructor is ca... 21 Dec 2007 03:29
Which destructor is called in which sequence at the end of the main program? Assume I have the following code structure: class A .... { ..... } class B .... { .... } main () { A a; B b; ..... } Both objcts a and b are created at the beginning. But when the main program reaches the end which destructor is called first: ~A() or ~B() ? Mark ... 22 Dec 2007 01:08
Can vector's elements are array? Is it possible to have the following code? If not how to solve it (I don't want to use pointer)? <code> vector<int[2]> a; int[2] b; b[0]=0; b[1]=1; a.push_back(a); </code> ... 25 Dec 2007 18:53
C++ exercise: Find an example where it would make sense to use a name in its own initializer. Here is a sample, but it doens't make sense: int x=x; Can anyone find a good one? Thanks ... 21 Dec 2007 13:50
Search a web page which offers nifty little test questions and solution about programming C++ I think there are somewhere web pages which offer some small basic questions about C++ programming with the topics: constructor, destructor, overloading, virtual function definitions, new, delete, pointer,... and the solutions for them. I would like to test my personal knowledge before passing an exam. Can... 19 Dec 2007 12:30
Design question Hi, I've a design question: I've implemented a static program analysis (for C programs) which currently does not support the data type float and double in the output program. My question is now how to react when the user provides a C source code with floats as input which cannot be analyzed. Since the anal... 19 Dec 2007 15:22
How to return a reference to a derived object Hi, I've got a program which with a class structure similar to the following: class A class B : public A class C : public B Now, there is a function in class A that must make use of a couple of functions defined in class B. Before I look at redesigning this code (because this may be poor design), I'd lik... 15 Jan 2008 11:41
Old fashion function definition? A2B said: I did this: #include <stdio.h> main() { printf("hello, world\n"); } from K&R 2nd Edition. and got the message 'old fashioned function definition at line 4. I thought this book was the authority on c Effectively, it still is. De jure, the authority on C is ISO/IEC 9... 9 Dec 2007 23:39
Arrays Could someone explain the concept of arrays to me please! My internet's blocked so I can't google it ... 9 Dec 2007 23:39
std container with fixed size and drop oldest function Hi, currently i deal with the C++ Standard Template Library and i wonder how i can realize a container with n elements that drops the oldest when the n+1 values is added. Is there already a container type or do i have to realize this? A vector pop_back that removes the "first" not the last element of a vect... 9 Dec 2007 23:39 |