Questions tagged [derived]

429 questions
-1
votes
2 answers

why my derived class is an abstract class? C++

//abstract product class AbstractProduct { public: virtual void diplay(void) = 0; }; //concrete product class Histogram : public AbstractProduct { public: Histogram() { cout << "default construct a Histogram!" << endl; } …
user4185295
  • 17
  • 1
  • 1
-1
votes
1 answer

MySQL: Order of derived table is forgotten

Sometime between yesterday and this June my hosting provider must have updated their MySQL since the following query now yields a different result than before. I use the query as part of a union, but I have only copy/pasted the none working part -…
Peach2tm
  • 13
  • 2
-1
votes
1 answer

Mongo : How to query particular derived class in mongo?(using monogcsharpdriver 1.9.2)

public class Person { List Contacts {get;set;} } public abstract class Contact { string Value {get;set;} } public class Email : Contact { } public class Chat: Contact { } I have typed collection for Person. How can I query…
dspatil
  • 327
  • 2
  • 8
-1
votes
1 answer

EntityFramework code-first ignoring derived columns when creating database

I would like some of tables in my database to have standard columns such as createdBy, ModifiedBy, CreatedDateTime, modifiedDateTime etc. So, I created an interface with those properties and implemented the interface in an abstract base class. I…
RT.
  • 435
  • 2
  • 9
  • 25
-1
votes
1 answer

Derived Column Functionality error

I have 2 new columns from Derived Column functionality and I have to merge them both into one Column and feed it to the destination Table. Derived column 1: ABC BBC CBC Derived Column 2: HPC DRT RTY Derived Column 3 should…
-1
votes
2 answers

c++ Inheritance class constructor

I have a slight problem where to be honest I am totally confused with derived class constructors and need some help. I have a base class with the parameterised constructor: Element::Element(RandomNumber &rnd, Console &console) : rnd(rnd),…
Alyn
  • 55
  • 1
  • 7
-1
votes
2 answers

two classes within a class

What is a better way to implement this in C++ (without if-else). In C I can initialize function pointer, and then just call function pointers. So if you look at class C, some objects of class C use only class A and some class B. I am more familiar…
user1869474
  • 57
  • 1
  • 1
  • 6
-1
votes
2 answers

Friend of a derived class can access what variables?

To simplify my problem, I have something like this: class Base { private: protected: int a,b; string c; public: [some functions here] } class Derived : public Base{ [some variables and functions] friend void…
user1799323
  • 649
  • 8
  • 25
-1
votes
1 answer

SQL Automatic Derived field

Ok, I'm looking for a way to make a certain field be equal to the sum of 3 other fields. I have 3 different rating fields, and then an 'overall rating' field, which I need to be automatically equal the sum of the other 3. I know how to retrieve the…
cameronjonesweb
  • 2,435
  • 3
  • 25
  • 37
-1
votes
2 answers

Cannot create Member Object if it's part of a parent class

I tried to create a member object (hope this terminus is correct) and it worked. But if I derive the class of the object it fails. Why is this the case and how do I solve that problem? class test { protected: int id; public: …
womdom
  • 55
  • 1
  • 6
-2
votes
1 answer

SQL derived value by a set of Row

Hi my table looks like this Combination of Rows with same S id is termed as a family. Output should have a Calculated Tier code based on below derivation Output put should be Output First time i am using Stackoverflow. I need a query in db2 and I…
-2
votes
2 answers

C++ Segmentation fault when trying to insert derived objects into an Object Array

I'm doing a project where we need to create a basic Zoo Tycoon game, in which we create a base class called Animal, 3 derived classes of Animal: Tiger, Penguin, Turtle. We also need to create a Zoo class that holds 3 separate arrays for each animal.…
-2
votes
2 answers

New method cannot be accessed by new object

Who ya gonna call? Unrelated code to pose the problem. Not the best editor tool so being terse. Thanks. A new method that is part of the derived class cannot be accessed by the new object. All the Intellisense sees are the abstract parts of the…
Elliot
  • 101
-2
votes
2 answers

Segmentation fault when calling derived class method

I have a problem related to designing derived classes with array parameters. I have class B derived from A. And class BB derived from AA with array of B and A respectively... #include class A { public: A(){} virtual void…
-2
votes
1 answer

C++ Error when I call a parent method as a derived object

#include #include using namespace std; class parent { int x=0; public: int getx() { return x; } }; class child : public parent { int x=7; }; int main() { parent cat; cout << cat.getx(); …
dfries
  • 1
  • 1
1 2 3
28
29