virtual

c++ virtual functions.

Just wondering, what would be fastest? If I had a base class like this Class Base { virtual void Draw() { //something... } }; Then I would have an array of Base like this: Base Array[255]; Which could contain both Base and it's derivatives. This would be one way of for example, storing various drawing commands. (I know this would s...

C++ - design question

Hello! I am working on game engine prototype and have the following question: Right now my engine implementation is DirectX-bound and everything works fine. I've got a core::Renderer class which has methods to render geometry, set shaders, lightning, etc... Some of them are templated, some not. class Renderer { // ... templat...

symbian virtual mini qwert keyboard style

Hi I want to implement some window that will look like the mini qwert virtual keyboard we can find on s60 5th edition phones like 5800. This window is floating and we can drag it over the screen using some small control at top right of window. Thanks for any suggestion ...

How do I put color on a virtual string tree node?

Is it possible for a virtual string tree to look like this? i really need help on this since i'm new in delphi.. ...

Virtual memory size

I have virtual memory size set to 756 MB on windows xp. but when reading on msdn it says virtual memory for each process on 32 bit OS is 4 GB by default. how it is different from the size of virtual memory that i set? **Memory** **range** **Usage** Low 2GB (0x00000000 through 0x7FFFFFFF) Used by the process. Hig...

virtual class in abstract class

Hello :) i would like to ask, if it's posible to make something like this: i have base class (parent) A and three other classes (childs) B C D in class A, i have virtual functions, that's ok. but what if i need a virtual class ? class A { public: virtual int func1()=0; virtual int func2()=0; virtual class AB; // !!!!??? }...

Page and page file

A page is a contiguous of block of 4 kb and so what is page file? how it is used by 32 bit processes? ...

view virtual memory usage visually while debugging

This might be a big ask, but are there any tools that let me view the virtual memory usage of my process in Linux? I am talking detailed, probably graphical view of memory, including what is going into the reserved addresses, the BSS/text/etc segments, heap, stack growth, etc, while I am stepping over the program in a debugger? ...

Class in header file

I'm having a bit of trouble with a C++ program I'm working on. I've created an abstract class with a single pure virtual method. Since the class has no variables or implemented methods, I've stored the class in a header file without an .cpp implementation file (there isn't any need for one). The method is: virtual void handleEvent() = ...

Incorrect vtable layout for class exported by DLL: request for clarification regarding headers and vtable construction.

Hello all, Although the problem at hand is solved, it has me a little confused as to what data is used to construct the vtables for a class and where the layout for the vtable is stored. If anyone can provide clarification or point me towards some information which might satiate my curiosity, I would greatly appreciate it. Background ...

Virtual Functions Object Slicing

Hi, My question is with reference to this question which explains how virtual functions work in case of object slicing which end up calling base class virtual function and Wikipedia article which explains the virtual table layout for a derived class for below code class A{ public: virtual void func(){ cout<<"\n In A:func"...

do i need virtual destructor for boost::ublas matrix ?

do i need virtual destructor when iam using boost::ublas matrix ? btw my class is a template class ...

IIS Virtual and Physical directories as seen from Internet

Hi, I have a problem with physical and virtual directories on my shared windows hosting account, where it's IIS6 and I manage my hosting via Dot Net Panel (2.8.4). I have installed a copy of BlogEngine.net into wwwroot\myblog, and created a virtual directory mydomain.co.uk\blog to point to it. My hoster has enabled my domain to run Appl...

Pointer to member question

$4.11/2 states - An rvalue of type “pointer to member of B of type cv T,” where B is a class type, can be converted to an rvalue of type “pointer to member of D of type cv T,” where D is a derived class (clause 10) of B. If B is an inaccessible (clause 11), ambiguous (10.2) or virtual (10.1) base class of D, a progra...

C++: overriding pure virtual member variable?

This question is best described in code. I have a class called Vertex that contains an instance of a class called Params: class Params { virtual Params operator + (Params const& p) = 0; }; class Vertex { public: Params operator + (Params const& ap) const { return p + ap }; virtual float eva...

How to call a derived class method from a base class method within the constructor of base...

I am wondering if it is possible to call a derived class´ function from within a function called by the base constructor (shouldn´t it already be created when the code in the brackets are executed?) #pragma once class ClassA { public: ClassA(void); virtual ~ClassA(void); void Init(); protected: short m_a; short m_b; virtual voi...

[C++] covariant return types

Hi, I have a VectorN class, and a Vector3 class inherited from VectorN (which can handle cross products for example). I have trouble determining the return types of the different operators. Example: class VectorN { public: VectorN(){}; virtual VectorN operator*(const double& d) {.....}; std::vector<double> coords; }; class Vec...

Find highest free virtual memory with POSIX API

As the title says, how can I find a free block to be allocated at the highest virtual address using only the POSIX API? ...

Calling virtual function in subclass from superclass

Hello StackOverflow I know this question must have been covered endless of times, but I've searched the previous questions, and nothing seems to pop. It's about inheritance and virtual functions i C++. I have a problem with calling virtual functions in subclasses from the superclass. Let me give an example. Start of with three classes...

C++ and Java : Use of virtual base class

Hi all ! I have some doubts while comparing C++ and Java multiple inheritance. Even Java uses multiple, multi-level inheritance through interfaces - but why doesnt it use anything like a virtual base class as in C++ ? Is it because the members of a java interface are being ensured one copy in memory (they are public static final), and...