Search:
Type: Posts; User: abeginner
Search:
Search took 0.02 seconds.
-
November 19th, 2011, 10:10 PM
The location pointed by "ptr" may be getting written by another thread. But why left-shift "k"?
-
November 19th, 2011, 09:44 PM
What's the purpose of the code:
void wait ( int *ptr, int k) { while ((1 << k) & (*ptr) == 0) {} }
-
October 7th, 2011, 10:27 PM
I get a syntax error for referring to a previously defined class.
file first.cpp
---------
namespace NS {
class C : public B {
int m;
}
-
April 10th, 2011, 12:34 AM
I have placed both short/long versions of my story/questions here.
Short story:
I have a job offer from a top 10 semiconductor companies in SF bay area, and after about 10 years of experience in...
-
February 21st, 2010, 09:41 PM
Fine but in a common compiler such as gcc implements it as vptr/vtbl mechanism. For gcc, does anyone know why it should not be 1 vptr but 2?
-
February 21st, 2010, 04:38 PM
Shouldn't it be a just 1 vptr, not 2?
-
February 21st, 2010, 12:12 PM
Where are non-virtual non-static member functions stored?
where are static member functions stored?
Why is sizeof (ABCDerived) be 24 and not 20 (if iMem do not override then 16 bytes for iMem...
-
February 21st, 2010, 11:25 AM
-
February 21st, 2010, 11:24 AM
I read somewhere that non-virtual non-static member functions do not add to the size of a class object, but can someone tell me where they are stored in memory. Static members functions, which also...
-
February 18th, 2010, 06:25 PM
I overloaded op delete in the following way, but from the output I get it seems op delete does not get called for "delete a2". Anyone knows why? Running on visual studio.
---
#include <iostream>...
-
January 8th, 2010, 10:13 AM
I understand that, however, my original concern is different. If someone asks you a design question, I suspect that starting out like " these are the classes and the member function", is not the...
-
January 8th, 2010, 09:48 AM
what do you mean by order, order, order? and data and processes?
Any link I can refer to quickly absorb this methodology/key steps?
-
January 8th, 2010, 01:37 AM
How is one supposed to go about thinking and doing object-oriented design for a system? If someone asks me to design some utitlity in a OO language, I would start by defining classes that I deem...
-
January 5th, 2010, 04:05 PM
I have the following statement in my vc++ code, so I could use npos instead of string::npos
--
using namespace std::string;
--
But I get the following error. Similar error is issued if I do...
-
September 28th, 2009, 04:04 PM
same logic: change m2 to m3
-
September 28th, 2009, 03:17 PM
sorry not sure i follow. If a new non-POD object is added as a member say std::vector, why does memset break the code - would not std::vector member's size get included in sizeof(*this)
-
September 28th, 2009, 11:58 AM
Paul Mckenzie,
Whether a ctor is correct or not depends upon what it is expected to do per design. it is not clear whether the designer expected ctor to allocate memory for long *p. If yes, then...
-
September 28th, 2009, 11:51 AM
nuzzle,
(d) would recompile by the same logic as (a).
class A {
void a(int i, int j ) {...} // m1
void a(int i) {..} // m2
}
If you add m3 to A:
-
September 28th, 2009, 10:34 AM
In (a) - the newly added constructor may be a candidate for constructor call among many overloaded constructors, thus becoming a viable candidate function for some constructor calls.
class A {
...
-
September 27th, 2009, 08:25 PM
Any help, please!
The other one was:
whats wrong with the code..
class T {
public:
T();
private:;
-
September 27th, 2009, 04:31 PM
class T {
public:
T();
private:;
char c[7];
long *p;
};
T::T() { memset(this, 0, sizeof(*this)); }
-
September 27th, 2009, 04:10 PM
I ran into following question:
You have a class that many libraries depend on. Now you need to modify the class for one application. Which of the following changes require recompiling all...
-
September 18th, 2009, 08:16 PM
Hi,
I was trying to write overloaded == operator for string class. When I use only "s" instead of "&s" in the statement "this == &s", I get the following error. My question is: Is not "s" a...
|
Click Here to Expand Forum to Full Width
|