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)
Convert to:
If i compile that, the error is:
May someone help me?
Hello,
i am using the sigaction function to handle the SIGCHLD signal.Is it possible to use a class member function as the handler function (the sa_handler member of the sigaction structure)?
The function's signature is:
void (*sa_handler)(int);so i don't think i can use a static member function... (2 Replies)
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)
I have the following class and thought that when I call the set command to set a member, I always use value. Would that be fine?
class ModMisfit {
protected:
Real dtau;
Real mdacc;
Real mindist;
bool hw;
Source** src;
public:
void ... (7 Replies)
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)
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)
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)
There is base class B, and two derived classes D1 and D2 derived from Base. Base class B, have two data members ( public or protected or private or if any). D1 should inherit both these data members, and D2 should be deriving only one member from Base class. Is this kind of design possible without... (1 Reply)
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
LEARN ABOUT DEBIAN
monop
monop(1) General Commands Manual monop(1)NAME
monop, monop2 - Mono Class Outline Viewer
SYNOPSIS
monop [-r:assembly] [--search] class
OPTIONS
-r:assembly
Specifies the assembly to use for looking up the type
-a Renders all of the types in the specified assembly.
--search, -s, -k
Searches through all known assemblies for types containing `class'.
--refs Prints a list of the referenced assemblies for an assembly. Requires an assembly to be specified with -r:assembly.
--filter-obsolete, -f
Do not show obsolete types and members.
--declared-only, -d
Only show members declared in the type.
--private, -p
Show private members.
--runtime-version
Print runtime version.
DESCRIPTION
Monop is a tool that allows you to view the outline of a class. You can see the signature of each member of the class. Use monop to
explore 1.0 assemblies, use monop2 to explore 2.0 assemblies.
The tool takes one option, the class to view. You must specify the full name of the class, including namespace.
For generic classes, you must specify the generic arguments, for example:
monop2 'System.Collections.Generic.List`1'
The above is the string representation for the List<T> in System.Collections.Generic
If you are unsure of the full name of the class, you can use the `--search' option to search through all known assemblies.
MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
WEB SITE
Visit http://www.mono-project.com for details
monop(1)