Programming :: [c++] Mixing Abstract Classes And Multiple Inheritance?

Apr 18, 2011

Why are the 'defense' method calls actually using the 'offense' methods.Also, is there a way to remove the commented base classes for 'Player' so that the casting isn't necessary?

Code:
#include <iostream>
class Offense

[code]...

View 1 Replies


ADVERTISEMENT

Programming :: Reg: C++ Abstract Classes?

Oct 28, 2010

I know the basic answer about how to create a class as ABC.But I don;'t know- - why I have to create a AbstractBaseClass. - In what situations it can be used.an example code base and not like a animal(base) and tiger(derived) relationship example.

View 2 Replies View Related

Programming :: Implement Inheritance An Polymorphism In Plain C?

Mar 20, 2009

how to implement inheritance an polymorphism in plain C. Most of them do this through function pointers.However I'd like to support multiple inheritance.

View 14 Replies View Related

Ubuntu Installation :: Mixing Grub1 And Grub2 On Multiple Distros?

Aug 8, 2010

How is this supposed to work out? I noticed some distros are really good about recognizing your other linux distros and some not. They keep recognizing windows, but not other linux distros. Also, I have run into a few problems when my operating systems were on different hard drives. I have my operating systems running from a small 250gb laptop hard drive with special mounting and am using my TB hard drive for internal storage /data.However, my last attempt at installing a linux partition on the TB hard drive with Windows and another linux partition on the laptop hard drive didnt work out so well. Updating grub via the command line didnt sort this out. Sudo su root Apt-get update grub (or grub update) or whatever didnt work before when I tried it.

View 4 Replies View Related

Programming :: C++Linking Classes/.cpp Files To Run One After Other?

Apr 11, 2010

This is probably a really stupid thing to ask considering the development I'm doing (effectivly creating a virus scanner), but how do I link classes/cpp files?I have 3 applications/sections that I can compile/combine with a makefile, that's fine, but I need them to run 1, 2, 3 once the output from the makefile is done.Currently the only section to actually run is whichever I have "main" in and obviously if I put that into all three, they won't compile as one.I've been looking all over the place at all sorts, header files and such, but there is no mention of how toually do this although I'm sure it must be possible. I'm used to being able to do this in Java and I'm sure I've seen C++ applications do it, but not worked out how.I have 3x .cpp files which are combined into one using a makefile:

Code:
# Virus Scanner
scanner.out : ProgramList.o MD5Hash.o HazardCheck.o

[code]...

View 2 Replies View Related

Programming :: Possible To Have A Templated C++ Stl Containers In Classes?

Feb 15, 2010

Is it possible to have a templated c++ stl container in another class without specifying the type prior to compile time? I haven't coded in c++ in a while and im at a total loss.

For example - Not real code. Just outlining the problem code...

View 1 Replies View Related

Programming :: Saving A Certain Variable And Using It In All The Classes?

Feb 4, 2010

facing a problem in declaring variables. i have a few classes like the one below...

Code:
#ifndef _FINANCE_H
#define_FINANCE_H

[code]....

View 1 Replies View Related

Programming :: Child Classes That Extend Each Type Of Pet

Jan 6, 2011

I am fairly new to c++. There must be a better way to do the following?:- Say I have a base class, Pet. I have several child classes that extend from this, like Dog, Cat, Fish etc.

I have the following function, that returns a pointer to a new Pet:-
Code: Pet* addPetToVet()
{ //Do some stuff
return new Pet();
} This will return a pointer an instance of a pet object.

Now, if I want to interpret this pet as a dog or cat I have to do this:-
Code: Dog* dogA = static_cast<Dog*>(addPetToVet());
Cat* catA = static_cast<Cat*>(addPetToVet()); Is there a way around this? Casting seems lame. I cant write a function for each type of pet.

View 5 Replies View Related

Programming :: Java : Use Dynamically Loaded Classes?

May 15, 2010

I'm new to Java.
I'm trying to use some dynamically loaded classes in my application.
The application doesn't know those classes , Just it try to load a class by name that its name came from input.
It doesn't know class (So I can't use casting) but just needs to call some methods of that class (every class should have that methods).
I thought about interfaces but I don't know how.
How can I call those methods?

View 1 Replies View Related

Programming :: Equivalence Classes Based On Field Values And Multi-key Hashtable?

May 12, 2010

I've got a set of objects (all of the same type). I'm trying to think of a good way to divide it into equivalence classes, with equivalence of two objects defined as meaning a specified set of attributes are equal for both objects. More concretely, I've got:

- a Java class with around 50 fields
- a bunch of instances of the class

I want:

- to divide the instances into a few sets
- in each set, each instance has field 1 - field 5 equal to fields 1-5 of the other instances in the set.

The method I've come up with is to generate a hashcode for each instance based on the hashcodes of fields 1-5*, and map the hashcode to one of my sets. Ignoring problems with potential hashcode collisions (which I'm expecting to be too rare to worry about for now), does that sound reasonable? It seems simple enough, but I'm wondering if there's a simpler method I haven't thought of.

* I'll generate the hashcode using a method based on Eclipse's generic hashcode method, which looks like this:

Code:

public int hashCode() {
final int prime = 31;
int result = 1;

[code]....

View 5 Replies View Related

Software :: Creating Abstract Backgrounds In Gimp?

Jan 31, 2011

How do you create effects like the ones thau/fedora wallpapers usually have?ExamplThere must be a tutorial on dog it somewhere. I did a quick search but as I'm not really into graphics design, I don't

View 4 Replies View Related

Ubuntu :: Mixing Apt-* And Aptitude NOK?

Aug 25, 2010

I read somewhere that it's not a good idea to mix the use of apt-* (eg. apt-get, apt-file, etc.) and "aptitude". I guess they're not using the same database to keep track of things.Problem is, they don't offer the same features:"apt-get safe-upgrade" doesn't exist, so have to use "aptitude safe-upgrade"."aptitude show/list mypackage" doesn't show the files that an uninstalled package (ie. still in depot) contains, so have to use "apt-file show mypackage".

View 9 Replies View Related

General :: How To Connect Two Different Ip Classes In Lan In System

Jun 14, 2010

In our LAN connection setup. having 192.168.1.0/24 and 192.168.2.0/24 how do i connected intermediately. server are RHEL5.

View 2 Replies View Related

Ubuntu Servers :: LVM Mixing IDE And SATA?

Mar 6, 2010

Is LVM sensitive to mixing different drives w/different specs? If I mix IDE and SATA drives are there issues?

View 1 Replies View Related

Software :: PulseAudio Mixing Sounds ?

Jan 19, 2011

I want to both talk and play songs on my machine which will be broadcasted to an Icecast machine. Any pointers on how to pull this off?

View 3 Replies View Related

Ubuntu :: Send .docx For College Classes?

Apr 2, 2011

I started taking CIT 101 (computer classes 101 LOL i know) as I am strict linux, in my house, purchasing office 2007 yes they require 2007 not 2010. Columbus State is tough on that, I need to be able to send documents in 2007 .docx in openoffice 3.3. The only computer that uses windows, is my grandparents and I don't want to buy Office if at all possible. I have like no money after all the text books. Teacher is strict it can not be .doc, odt. or other, needs to be .docx

View 9 Replies View Related

General :: Cups Implicit Classes And Windows

Oct 20, 2010

To foster from the failover concept of Cups I have set up 2 servers with the same printers and settings to enable the implicit classes.

Server A

I added first aprinter defined with the name myprinter (a Ricoh MP5000)

Server B

On Server B i did no printer definition

That is working fine on Cups web interface of Server B i see queuename Server A.myprinter(and vice versa).

Now I add the printer (without samba via ipp) to my windows client with the parameters [url]. I can print that way all ok. The job appears and will be printed on Server A

When I disable myprinter on A. I cannot print. I expected with the implicit classes that it switches to Server B. Is the idea wrong ? Or is Windows limited here ? Or is there another way of defintion I have to do.

My both servers are running on different platforms Suse SLES 10 and Red Hat. CUPS version 1.4.4

View 2 Replies View Related

Server :: Tomcat 7.0.8 Not Finding Packaged Classes?

Mar 11, 2011

I'm trying to set up Apache Tomcat with virtual hosting. I've used Caucho Resin before but not Tomcat...and I've run into what appears to be (from Google at least) a rather common problem with Tomcat in that any properly packaged classes under WEB-INF of the default virtual host or the named host are not found and Tomcat complains of a class that "cannot be resolved to a type". I researched this error on Google and the consensus seems to be that: -

- You need properly packaged classes as classes in the default package are no longer allowed. I have done this.

- You need to either fully declare the packaged class to make an instance of it within the JSP or include the via an import statement at the top of the JSP. I have done this.

- In the web.xml for the Tomcat server instance (under $CATALINA_HOME/conf/web.xml) you need to set the servlet mapping for JSPs fork init-param to "true". I have done this also.

Yet the problem persists and I have found no solution. So I can only assume I'm missing something obvious and fundamental. My configuration is as follows: - I have two virtual hosts - one as the default virtual host and another as a named virtual host.

$CATALINA_HOME/webapps/localhost <--- Default host.
$CATALINA_HOME/webapps/www.easicasino.com <--- Named host. The logic being that the URL IP address of the server will hit the default webapp and the URL hostname with hit the named webapp. This appears to work with just JSPs.

My $CATALINA_HOME/conf/server.xml looks like this: -

Code:

<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />

[code]....

View 1 Replies View Related

Debian Configuration :: Mixing Partitions In RAID 5

Mar 21, 2011

I have 2x 1.5TB hard disks and I'm going to buy a new 2TB drive soon. First though I just wanted to check that I could partition off the first 1/4 to 1/3 of the 2TB drive (leaving 1.5TB or more free) and install Debian to that part, then use the remainder of the disk in combination with the 2x 1.5 TB drives in RAID 5? i.e. can you mix whole drives and with partitions from other drives in RAID 5 and/or is it best to just stick with complete drives for the RAID array?I only have room for 3 drives in the small mATX case that houses my NAS device and I want to maximise storage capacity and minimise expense.

View 2 Replies View Related

Fedora :: Which Software Are Best For Music Making And Mixing

Aug 1, 2010

Wich software are the best for music making and mixing on Linux? Something equal to Traktor or VirtualDJ on win?

View 3 Replies View Related

Ubuntu Servers :: Mixing Apt And Compiled Packages?

Jul 21, 2010

I don't want to screw up my system, but I need newer versions of packages then the ones in the apt repos. What is the community consensus on the best way to mix apt package management with building bleeding edge packages from source?

Should I build the source into a package and install it with apt? Should I avoid make install?

I would also like to be able to use multiple versions of the same package, and have some sort of sym link or something to determine which version gets executed.

View 7 Replies View Related

Ubuntu :: Mixing Up TV-Tuner And Sound Card?

Nov 17, 2010

A while ago I reinstalled Ubuntu on my PC when I felt that Windows was about to give up. I'm glad I did. A lot of the applications I had on my Mac had equivalents on Linux, I was delighted and I haven't been needing Windows at all.

Up until recently everything was working fine, but now I think Linux is mixing up my Sound Card with my TV Tuner. When I call someone using Skype, it ends up airing white noise, however, if I've watched TV prior to that, it ends up airing the sound from whatever channel I was watching last. If I turn on the video calling function (despite the fact that I haven't got any webcam plugged in) it ends up airing video from that same channel.

It just started doing this randomly, and as I did some experiments, I discovered that it does this with all audio-input applications. (Sound Recorder etc,)

So I installed Pulseaudio device manager, and I discovered that my soundcard isn't listed under output devices.

View 2 Replies View Related

Software :: Evolution Mixing Up Mail Metadata

Jan 5, 2011

This may be due to a case (non-)sensitivity issue. I have two subfolders on the mail server called "Spam" and "spam". On the mail server (Dovecot), these are directories ".INBOX.Spam" and ".INBOX.spam". The issue I am seeing is that the information shown in the index area of Evolution's window has, for some mail, information that belongs to other mail in the other folder. But when I click on that line, I see the corresponding correct email that should be in that position.

Because this happens to be spam, I just went ahead and trashed everything in one of the folders. That one action trashed everything in both folders.Is there a way to tell Evolution to dismiss everything it thinks it knows about the state of mail on the mail server and re-acquire it all? Or could this be an IMAP server issue with Dovecot?

View 1 Replies View Related

Ubuntu :: Mixing 512 & 4k Sector HD's In A Software RAID 5 Array

Mar 24, 2010

I currently have a mirror raid array with 2x 1TB HD's (Western Digital Caviar Green WD10EADS SATA). They are both the standard 512 byte sector HD's. I just ordered a new 1TB Hard Drive (Western Digital Caviar Green WD10EARS SATA) as I want to wipe the current mirror raid and use the 3 disks in a raid 5 array.

But to my suprise, the new 1TB HD is an "advanced format" HD with 4k byte sectors... Am I screwed or can this 4k byte sector HD be used in a software raid 5 array along with the 512 byte sector hard drives?

(The WD hard drive says you can jumper it to work with XP which can only use 512 byte sectors... there's also a utility you can run that does something to make it compatible with XP too.... Makes me wonder if these new drives are backwards compatible?)

View 1 Replies View Related

Ubuntu Servers :: Mixing Both Hardy And Lucid Repositories?

Jan 24, 2011

I have Ubuntu Server 8.04 (LTS) installed and running well, but there a few packages that I'd like to upgrade, without upgrading the entire system (e.g, apache2). Is it possible to include both the Hardy (8.04) and Lucid (10.04) distributions in sources.list? Is that even safe? By the same token, can I add a Maverick repo to my list? I'm using "apache2" as an example, but this is more of a general question.

How should situations like this usually be handled, when only a select few packages would profit from an upgrade that resides in a different Ubuntu release?

On a similar note, is it possible to install two different versions of the same package using the APT tools? Let's say I want two different versions of php5 -- how would I go about doing that?

View 2 Replies View Related

Hardware :: Mixing Memory In Triple Channel Board?

Mar 23, 2010

We recently bought an i7 X58 server with 6 memory slots. Since it was cheaper, we opted to get the min memory configuration with the machine (3x1Gb) and then buy 3x4Gb separately. It seems a shame to waste the 3Gb, so I'm wondering how to "mix" the memory without sending everything into single channel mode. The information I've read is rather confusing, and often contradictory.

View 1 Replies View Related

Hardware :: Software Mixing - Audio Chip VT1708S

Oct 19, 2010

Starting over, based on this thread: [URL] And my problem which is the same! I have the same audio chipset and experienced the same issues. I hope there is nothing about that chip. I tried with XFCE4 on Slackware 13.1 and now KDE4 on Debian, I found a workaround on XFCE by installing gstreamer and using it instead of xine as the phonon backend. That workaround apparently doesn't work on KDE.

Something interesting (also in the original thread): Software mixing through alsa DOES work since I can play several files in aplay (command line) or xine (gui standalone) simultaneously. I don't have another soundcard. Should I install pulseaudio anyway? Switching to OSS ?

View 1 Replies View Related

Programming :: Programming To Multiple Video Cards

Jun 24, 2009

I've browsed the internet, but haven't found a satisfying answer. Hope this forum can help me in the right direction.I'm exploring the possibilities of creating a program that manipulates (writes to) two different video cards.I program in C and hope to avoid high level libraries like Xlib to keep the mem footprint as low and the performance as high as possible. Windowing is not important no desktop environment will be used. Be able to write two pixels (one to each screen) to would do.

How would I go about?To give an idea of the solution I'm looking for:One screen will show thumbnails of images on the hard drive. Clicking an thumbnail on display A will show the selection full screen on display B. On a laptop; preferably thumbnails on the laptop screen and the selected image on the external monitor.Is this possible with just low-level libs or do I need X or some third-party software to make life easy?

View 14 Replies View Related

Software :: Finding A Music Editing/production/mixing Program?

May 26, 2011

I want to be able to open a file (support for .mp3 and .ogg a must) and add effects, change pitch and tempo, add beats (either default or midi created), mix with other songs (or clips from), be able to change levels of the high/mid/low, alter gain and frequencies ... all that fun stuff.

programs I already have are:

MixXx
LMMS (Linux MuliMedia Studio)
mhWavedit
-and-
gAlan

And it doesn't seem that any of those have the features I am looking for. I am running Zorin OS 4 (ubuntu 11.04 based) and Dreamlinux 3.5 (debian- unsure which release) on a fujitsu lifebook 5 series - S6240 (it's kinda old 2005).

View 3 Replies View Related

Slackware :: Mixing 13 And 13-current Java Packages - Pros And Cons?

Apr 28, 2010

I understand it is not generally a good idea to mix 13 and 13-current packages but I am installing OpenProj which requires JDK and the installed JRE (6-18) is up-level from 13's JRE (6-16) and back-level from the 13-current JDK (6-19). Presumably JRE and JDK should be at the same level. Would it be better to take both JRE and JDK to 13-current (6-19) or to take both to 13 (6-16)?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved