Sponsored Content
Top Forums Programming About uncopyable class (on book:Effective C++) Post 302738455 by Corona688 on Saturday 1st of December 2012 12:40:34 PM
Old 12-01-2012
A copy constructor's not going to get called unless you copy it. Your Dog(const Dog &rhs) constructor does literally nothing -- it's not even going to copy Dog, and passes nothing into Uncopyable. Lacking any other information, the compiler uses the default.

Last edited by Corona688; 12-01-2012 at 01:45 PM..
 

9 More Discussions You Might Find Interesting

1. Cybersecurity

Changing effective user

I would like to give execution rights for a script to one user. (that's the easy part...) When that user is running the script, I would like the effective user ID to be that of the file-owner. Is this possible? (6 Replies)
Discussion started by: hilmel
6 Replies

2. UNIX for Dummies Questions & Answers

most effective search ?

what's the most efficient and effective search for a file in a dir ? I see many guys use this # find - print or something as such ? and sometimes pipe it to something else ? Is there a better way of using "grep" in all of this ? thanks simon2000 (3 Replies)
Discussion started by: simon2000
3 Replies

3. UNIX for Dummies Questions & Answers

car class (not school class)

im just trying to have some fun and kill some time writing a c++ program that has a person type in a car make and model then gives them a year and a price. or something like that. i always have problems getting it goin but once the ball is rolling im usually pretty good. anyone wanna help me out? ... (1 Reply)
Discussion started by: rickym2626
1 Replies

4. Programming

C++ class definition with a member of the same class

Hi, i have a question about C++. Is it possible to declare a class with a member ot the same class? For example, a linked list or i want to convert this C code to C++ class (Elemento) typedef struct elemento { char name; char value; List<struct elemento> ltElementos; ... (7 Replies)
Discussion started by: pogdorica
7 Replies

5. UNIX for Dummies Questions & Answers

Real and Effective IDs

Can anyone explain me in details of Real and Effective IDs (6 Replies)
Discussion started by: kkalyan
6 Replies

6. Programming

static use for class inside the same class c++

Hi, I believe the next code is wrong: class Egg { Egg e; int i; Egg(int ii=0) : i(ii) {} }; because you would end up with an endless definition (memory allocation) of Egg objects, thus int i. Ok, so God Eckel proposes for a singleton: class Egg { static Egg e; int... (5 Replies)
Discussion started by: xavipoes
5 Replies

7. UNIX for Advanced & Expert Users

Get pointer for existing device class (struct class) in Linux kernel module

Hi all! I am trying to register a device in an existing device class, but I am having trouble getting the pointer to an existing class. I can create a class in a module, get the pointer to it and then use it to register the device with: *cl = class_create(THIS_MODULE, className);... (0 Replies)
Discussion started by: hdaniel@ualg.pt
0 Replies

8. Programming

Size of Derived class, upon virtual base class inheritance

I have the two class definition as follows. class A { public: int a; }; class B : virtual public A{ }; The size of class A is shown as 4, and size of class B is shown as 16. Why is this effect ?. (2 Replies)
Discussion started by: techmonk
2 Replies

9. Programming

C++ : Base class member function not accessible from derived class

Hello All, I am a learner in C++. I was testing my inheritance knowledge with following piece of code. #include <iostream> using namespace std; class base { public : void display() { cout << "In base display()" << endl; } void display(int k) {... (2 Replies)
Discussion started by: anand.shah
2 Replies
SoDetailList(3) 						       Coin							   SoDetailList(3)

NAME
SoDetailList - The SoDetailList class is a container for pointers to SoDetail objects. This list class will delete the details when destructed/truncated, or when a detail in the list is replaced by another detail. The caller is responsible for allocating the details passed to the list, but should not deallocate them since this will be handled by the list. SYNOPSIS
#include <Inventor/lists/SoDetailList.h> Inherits SbPList. Public Member Functions SoDetailList (void) SoDetailList (const int sizehint) SoDetailList (const SoDetailList &l) ~SoDetailList () void append (SoDetail *detail) void insert (SoDetail *detail, const int insertbefore) void truncate (const int length, const int fit=0) void copy (const SoDetailList &l) SoDetailList & operator= (const SoDetailList &l) SoDetail * operator[] (const int idx) const void set (const int index, SoDetail *item) Additional Inherited Members Detailed Description The SoDetailList class is a container for pointers to SoDetail objects. This list class will delete the details when destructed/truncated, or when a detail in the list is replaced by another detail. The caller is responsible for allocating the details passed to the list, but should not deallocate them since this will be handled by the list. See also: SbPList Constructor &; Destructor Documentation SoDetailList::SoDetailList (void) [inline] Default constructor. SoDetailList::SoDetailList (const intsizehint) [inline] This constructor initializes the internal allocated size for the list to sizehint. Note that the list will still initially contain zero items. See also: SbList::SbList(const int sizehint) SoDetailList::SoDetailList (const SoDetailList &l) Copy constructor. SoDetailList::~SoDetailList () Destructor. Member Function Documentation void SoDetailList::truncate (const intlength, const intfit = 0) Overridden to delete truncated items. Reimplemented from SbPList. void SoDetailList::copy (const SoDetailList &l) Overridden to copy items, not just pointers. SoDetail * SoDetailList::operator[] (const intidx) const [inline] Returns element at idx. Will automatically expand the size of the internal array if idx is outside the current bounds of the list. The values of any additional pointers are then set to NULL. Reimplemented from SbPList. void SoDetailList::set (const intidx, SoDetail *detail) Overridden to delete old item. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SoDetailList(3)
All times are GMT -4. The time now is 01:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy