Search Result

Collapse
16 results in 0.0048 seconds.
Keywords
Members
Tags
classes
  •  

  • bums735 bums735
    started a topic polymorphism, is their a better way to do this
    in C

    polymorphism, is their a better way to do this

    hello everyone, im a bit new to c++, im missing a concept of polymorphism. my problem is i cant figure out another way to override a method.
    Code:
     
    #include <iostream>
    class Base {
    public:
       Base();
       ~Base();
    public:
       virtual void OutPut() {std::cout << "Base" << std::endl;}
    };
    
    class Derived : Base {
    public:
       Derived();
    ...
    See more | Go to post

  • shockna1
    started a topic Sharing variables and methods between classes

    Sharing variables and methods between classes

    I have recently come across a situation where various non-related class need to share variables and methods. The first thing that came to my mind was to make a static class with static variables and methods which works fine, but I was wondering if there was a more OO way of doing this. Thanks in advance!
    See more | Go to post

  • how to implement Java equivalent of Function Pointers via abstract classes

    Im trying to to create a simple 4 function calculator using a jump table without switch case or if/else statements. I understand I can create the jump table via function pointers but I am kindda blanking out. I've started with the addition and subtraction part of the program but am trying to grasp the design/strategy to use. I am also getting an error when putting the method in the array, so far this is what i have:....I'm also trying to figure out...
    See more | Go to post

  • How to print some details on RichText from an external class

    Hi

    Hope someone can help me here. I need your help urgently.

    I have MainForm which contains some buttons , textboxes, and one RichTextBox.

    I have also my own classes (Person , Employee , Engineer , Manager).

    When clicking on Print Button - I need to print all details and the values of the member variables of "Employee Class" into the RichTextBox.

    The problem that...
    See more | Go to post

  • shockna1
    started a topic What does a class in C++ look like in assembly?
    in C

    What does a class in C++ look like in assembly?

    If I defined a class in C++

    class SomeClass
    {
    ...
    }

    what would that look in assembly.
    See more | Go to post

  • Return class(a) pointer in another class(b) function

    So i've been working on a program in c++ that uses classes, and i am having a few problems with returning a class value from another class's function.

    So i have a class called X, which is essentially a class that defines a linked list, and has some of the basic operations. In that class i have a '[]' operator that is overloaded with each value in the linked list. The operator can also override values in the linked list using
    ...
    See more | Go to post
    Last edited by Nepomuk; Sep 12 '10, 08:23 AM. Reason: Please use [CODE] tags

  • Daniel101
    started a topic Passing a Method?
    in Java

    Passing a Method?

    Hello, I'm still new to Java and I have a certain problem in my code.

    I've made 2 classes (Person and Group) and 1 demo (Which is used for testing my classes).

    Person works perfectly fine when I use it along with my demo.
    Though, I'm having a bit of trouble importing/using certain methods from Person in Group.
    The problem is that I do not know how to import/use a method from another class in my Group class...
    See more | Go to post

  • dpswt
    started a topic Questions about classes in Python.

    Questions about classes in Python.

    Ok so, I'm really new at python (and programming itself) so sorry for my ignorance, but I really needed to ask this. So im doing a wxPython project where I added several tabs for a notebook (each tab of the notebook = a class) and there is one tab where I added a checkbox (in a tab, lets call it for example Tab1), and what I want is that when someone checks it, a button that exists in other tab (class called for example Tab2) gets disabled.
    ...
    See more | Go to post
    Last edited by dpswt; Apr 10 '10, 06:01 PM. Reason: forgot the code

  • multidimensional array of classes issue

    I'm writing a game in visual basic 2008 and things are going fairly well with it for the most part.. well until today.. I can declare a 1 dimensional array of a class just fine but cannot for the life of me get the syntax right for a multidimensiona l array. I usually don't have many issues in writing in VB but this is the first large scale program I have ever written in VB2008 and the 1st large scale uses of classes in VB as well

    Here...
    See more | Go to post

  • Pakmarshal
    started a topic Factory Method
    in .NET

    Factory Method

    Hi everyone,
    My issue is that my application supports Oracle,SQL Server and Sybase database. The problem is that when i have to execute some database script (lets say 15 table creation queries) but the syntax varies with respect to user backhand DBMS.
    They solution strick in my mind is to have an abstract class as parent and inherits "OracleChildCla ss","SQLChildCl ass" and "SysbaseChildCl ass" from the parent...
    See more | Go to post

  • Askelassen
    started a topic Object is currently in use elsewhere.

    Object is currently in use elsewhere.

    Hello. This is my first question asked in here, since I'm pretty new to c# programming. So I hope I write it in a proper understandable way.

    My problem is, that I have a program with sveral classes, and I want a bitmap sent from my graphic class to the main class, when an event occurs in the graphic class. The program runs fine for a while (2-3) seconds, but then I get this message: "Object is currently in use elsewhere"...
    See more | Go to post
    Last edited by tlhintoq; Nov 26 '09, 05:18 PM. Reason: [CODE] ...your code here... [/CODE] tags added

  • Dynamically selecting Class for use in program.

    I have 10 Classes that just hold data. int and string data. Nothing fancy.

    Yet. I have 10 possible selections from the user.
    Based on the selection. I want to Instantiate a specific class.
    Ver is the namespace the Data Classes are within.

    I don't have an Interface for this, and am not sure if I should. All 10 classes will have the exact same name for the variables. Just different internal data.
    I'll...
    See more | Go to post

  • askalottaqs
    started a topic classes and wx python

    classes and wx python

    i know everyone keeps saying that one needs to be using classes and not just functions, but so far i haven't had any problems with functions aside from the fact that everyone's using them and when i see the help in any of the forums it's all in classes form,

    my question is

    im working basically with wx python, mainly doing interfaces for applications and nothing too fancy, connecting small databases and what not,
    ...
    See more | Go to post

  • scott1010
    started a topic Class Inheritance and Overriding Methods

    Class Inheritance and Overriding Methods

    Hello,

    I am currently using Linq To Sql classes in my project, and I am implementing validation, but I am having a problem trying to create a generic validation class that I can use with the Linq To Sql classes.

    Specifically, I have a class named Contact - that has been generated automatically by Linq To Sql. So I can't change anything in it. But as it is a partial class I created another partial Contact that I want...
    See more | Go to post

  • nickburton
    started a topic Methods without creating an object?
    in Java

    Methods without creating an object?

    Hi there, I am new to Java and the concept of requiring a class/object to do everything..

    I am creating a menu based program and hence need to re-use segments of code. If I was writing in C, I would just create a method above the main program and then call that method each time I wanted to, for example, display a menu.

    The program I'm writing has two main classes from which I create objects to store data (imagine a 2D...
    See more | Go to post
Working...