derived Questions
1
Given the following sources:
public class SourceBase { public string TheString { get; set; } }
public class SourceDerived : SourceBase { }
and destinations:
public class DestBase { public strin...
Relations asked 9/5, 2011 at 20:29
4
Solved
Which of the two should be preferred?
There are some methods which are called by class A, B and C.
Should those methods be encapsulated in a class D (base of A, B and C) ?
OR
Should those met...
2
Solved
This compiles fine, although I wouldn't want to try running it just yet. However ...
//class base;
//class derived;
//class derived : public base;
class base {};
class derived : public base {};
...
Lycian asked 16/1, 2011 at 20:22
7
Solved
Here is my code -
#include<iostream>
using namespace std;
class base
{
public:
void sid()
{
}
};
class derived : private base
{
public:
void sid()
{
}
};
int main()
{
base * ptr;
...
Nimiety asked 9/9, 2010 at 8:19
3
Solved
Could someone explain me why this code:
class safe_bool_base
{ //13
protected:
typedef void (safe_bool_base::*bool_type)() const;
void this_type_does_not_support_comparisons() const {} //18
...
Hawser asked 7/9, 2010 at 9:41
2
Solved
Hi I am trying to serialize an array of objects which are derived from a class and I keep hitting the same error using c#. Any help is much appreciated.
obviously this example has been scaled down...
6
I have a class Car and a derived SportsCar: Car
Something like this:
public class Car
{
public int TopSpeed{ get; set; }
}
public class SportsCar : Car
{
public string GirlFriend { get; set; ...
Fa asked 12/5, 2010 at 11:49
2
Solved
Please take a look at this code:
template<class T>
class A
{
class base
{
};
class derived : public A<T>::base
{
};
public:
int f(typename A<T>::base& arg = typen...
Wheeling asked 16/4, 2010 at 13:19
5
Solved
This may seem kind of "homework-ish" and/or trivial, but it is for a real business purpose; it's just the easiest way I could think of to explain what I'm conceptually trying to do.
Suppose I hav...
Rearward asked 15/1, 2010 at 21:6
2
Solved
I feel my question is pretty dumb, or another way to put it is : I'm too lost in my code to see a workaround for now. Stay too long on a problem, and your vision becomes narrower and narrower ><...
3
Given this base class:
class Employee
{
char* name;
int age;
public:
Employee(char* name);
void print();
};
With regards to the "public", what's the difference between this:
class Manage...
8
Solved
This question has always been around my head.
Can someone create a new product based on an existing open source project?
Say you want to create an "Apaxe webserver" that is basically Apache...
Interfile asked 29/1, 2009 at 23:35
© 2022 - 2024 — McMap. All rights reserved.