25 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for can-mohan

Hi guys, I would like to discuss my design with one query. below is the code snippet. It is clear from below code snippet that class pd is privately derived from AbstractClass as both are different classes and there is no relation between them.Now in my class pd i need …

Member Avatar for can-mohan
0
409
Member Avatar for moaz.amin.37

the virtual Methods concept is very difficult concept. In c++ when we want to implement polymorphism then we use virtual function. But in the case of java i read that all methods in java are virtual by default except final methods that can not be overridden. I am confuse about …

Member Avatar for jwenting
0
298
Member Avatar for moaz.amin.37

i know that in polymorphism when we not use virtual function then the compiler is execuite member function according to pointer type and when we use virtual function then compiler execute member function according to the type of object My question is that WHY it is happnes what is the …

Member Avatar for mike_2000_17
0
289
Member Avatar for William Hemsworth
Member Avatar for stavros141

Hello everyone I am facing a problem that I have never encountered before and googling around just isn't helping. I was assigned to migrate a pmWiki server to a new MediaWiki server which was supposed to run as a virtual machine on a Red Hat Cluster Suite. My coworker and …

Member Avatar for stavros141
0
297
Member Avatar for tanatos.daniel

I have the following structure: CObject { protected: char *mName; public: CObject(char *n) { mName=strdup(n); } }; CVector:public CObject { char *mValues[50]; int mElements; public: CVector(char *n):CObject(n) {} }; CMatrix:public CObject { char *mValues[50][50]; int mLines; int mColumns; public: CMatrix(char *n):CObject(n) {} }; My main function: int main() { pV=new …

Member Avatar for deceptikon
0
383
Member Avatar for Labdabeta

Hello, I have a chain of inherited classes like this: class A { protected: int a; public: int getA(){return a;} }; class B:public A { protected: int b; public: int getB(){return b;} }; Based on that you can see that the public can only read the values in those classes, …

Member Avatar for Labdabeta
0
249
Member Avatar for sciwizeh

Hello, I have some java code I want to port to C++, and first class in the Heirarchy has me stumped. I'm trying to port a simple parsing framework as an exercise to figure out how it works internally, and almost everything in the framework requires, uses, or is `PubliclyClonable` …

Member Avatar for sciwizeh
0
427
Member Avatar for Octet

I am attempting to host multiple sites on a single server by using virtual hosts however I am having a bit of an issue. A bit of info before I begin, -I am using Ubuntu Server 12.04 -I am using Apache2 -I have two domains and two sites, stored in …

Member Avatar for Octet
0
415
Member Avatar for Octet

I am attempting to setup virtual hosts so that I can host multiple sites on Apache2. I have currently got two files in my /etc/apache2/sites-available folder, each containing the following: <VirtualHost *:80> ServerName www.domain.com ServerAlias domain.com DirectoryIndex index.php DocmentRoot /var/www/domain </VirtualHost> Obviously the 'domain' changes to the domain for the …

Member Avatar for billconner
0
401
Member Avatar for al41007

Hey! for a school project, came to me the following question: the libopenmetaverse is more directed to any of the components of the MVC (model, view, controller) or apply to any of them? someone can help me with this? thanks

Member Avatar for al41007
0
198
Member Avatar for Peter4n31

Hello, I need to update my older Autodesk plug-in. And I am having troubles get it through. (They changed one function) This is a new definition which I cannot change: [CODE] CoreExport virtual void EnumAuxFiles(AssetEnumCallback& assetEnum, DWORD flags);[/CODE] And here is my code: [CODE] class CheckFileNames: public AssetEnumCallback { public: …

Member Avatar for Peter4n31
0
364
Member Avatar for moneypro

#include<iostream> using namespace std; class area { double dim1, dim2; public: void setarea(double d1, double d2) { dim1= d1; dim2 = d2; } void getdim(double &d1, double &d2) { d1 = dim1; d2 = dim2; } virtual double getarea() { cout<<"You must override this functionn"; return 0.0; } }; class …

Member Avatar for moneypro
0
177
Member Avatar for galhajaj

Hi :) i am new in C# and i am a little confused with the abstruct, virtual and override terms in C#... why they are good for? i tried to google it but i got more confused... for example - i am making a chess program and i made a …

Member Avatar for Mitja Bonca
0
179
Member Avatar for Agni

I have been reading the 'inside the c++ object model' by Lippman and one of the sections has me a little confused. It is the section where the author explains how virtual tables are created and virtual pointers assigned, in the scenario of multilevel, single inheritance. If anyone here has …

Member Avatar for Agni
0
322
Member Avatar for ninjatalon

Today I was taught about virtual methods but got lost somewhere in the pointers. Here is an example [CODE] class Person { protected: string name; public: virtual string get_name() { return name; } }; class TFaculty:public Person { private: string title; public: virtual string get_name() { return title + " …

Member Avatar for Fbody
0
140
Member Avatar for ispeakbinary

I am learning c++ now and have encountered a problem in trying to create single digit addition, multiplication and subtraction math questions. The numbers used in the questions are randomly generated from 1 to 9 and when I try to print the answer for the corresponding question, I get a …

Member Avatar for prvnkmr194
0
192
Member Avatar for Labdabeta

I need a few helps for some things that I just cannot get the syntax of! (I need these, and if you don't believe me I can post the reason) 1) Creating a function within a function 2) Creating a class within a function 3) Declaring a template function outside …

Member Avatar for mike_2000_17
0
125
Member Avatar for Labdabeta

I am working on making a 'safetype' abstract class, which will have a complete set of pure virtual operator overloads to help make sure that a class inherited from it is safe to pass to virtual any function. The problem is that I don't know the syntax of a pure …

Member Avatar for Labdabeta
0
241
Member Avatar for venet

Hi, I have a Toshiba NB300 laptop running win7, and I'm trying to run some software that requires a screen res of at least 1024x700. Unfortunately, the max res of this laptop is 1024x600. I have searched the web looking for a solution for this, people with similar issues had …

Member Avatar for venet
0
404
Member Avatar for rje7

[code] public class Animal { public void eat() { System.out.println("I eat like a generic Animal."); } public static void main(String[] args) { } } class Fish extends Animal { @Override public void eat() { System.out.println("I eat like a fish!"); } } class Goldfish extends Fish { @Override public void eat() …

Member Avatar for javaAddict
0
166
Member Avatar for lytnus

I have a design question which I have not been able to find a satisfactory answer for by searching. Essentially, I have a class - Base - that contains a vector of pointers to another class - Node. However, I would like to be able extend both the Base and …

Member Avatar for lytnus
0
277
Member Avatar for madmax007

Hi, I want to develop a an application based on independent "CustomModule" that all derived from a base class "BaseModule" and that can send different kind of "CustomEvent" (derived from a "BaseModule" class) to each other. Each Module just knows that it is connected to others "BaseModule" (i.e. it does …

Member Avatar for madmax007
0
163
Member Avatar for peter_budo

I running my little blog on Tomcat 6 server. My hosting company allows me to set up multiple sub domains. I was trying to do for last few hours, but no luck. Having started with [code=xml] <Engine name="Catalina" defaultHost="mydomain.co.uk"> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> <Host name="mydomain.co.uk" appBase="/home/user/public_html" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> <Alias>www.mydomain.co.uk</Alias> …

Member Avatar for peter_budo
0
1K
Member Avatar for Alex_

Hello everybody. I wanted to ask what does exactly Win7 do with their so called xp mode. As i have seen from various clips, this "mode" is actually just a virtual machine that runs win XP. Am i right? If the answer is yes then how come not all processor …

Member Avatar for verakot
0
239

The End.