Search:

Type: Posts; User: Nereus

Search: Search took 0.01 seconds.

  1. Thread: Abstraction

    by Nereus
    Replies
    5
    Views
    2,547

    Sure, I agree about the use of overridden...

    Sure, I agree about the use of overridden functions is polymorphism in the way you describe, but isn't the ability to treat the different objects (not their methods) as the same an example...
  2. Thread: Abstraction

    by Nereus
    Replies
    5
    Views
    2,547

    Thanks for the reply laserlight! But doesn't...

    Thanks for the reply laserlight! But doesn't polymorphism mean that the members of a derived class are treated like those of its parent (or so Wikipedia says), whereas in my case it's the actually...
  3. Thread: Abstraction

    by Nereus
    Replies
    5
    Views
    2,547

    Abstraction

    If I have an array of pointers to objects of different classes that are derived from the same base class, is this an example of abstraction? :confused:
  4. Replies
    7
    Views
    1,098

    Thanks for the info, Salem. The code is several...

    Thanks for the info, Salem. The code is several thousand lines and I have no idea where in the code the problem is (as that's what I was using the profiler for), so I can't post any code,...
  5. Replies
    7
    Views
    1,098

    I think I may have found the reason for the empty...

    I think I may have found the reason for the empty data file... It seems that most of the runtime is due to system overhead, although I don't know why this is so. I don't write/read from files much or...
  6. Replies
    7
    Views
    1,098

    Yes, I looked there, but what I'm saying is that...

    Yes, I looked there, but what I'm saying is that I can't find the information I need in that documentation...

    I just found this in my file, which corroborates your idea: I searched for...
  7. Replies
    7
    Views
    1,098

    There's the online documentation, although I...

    There's the online documentation, although I can't find any relevant information in that. Perhaps I'm looking in the wrong places, or perhaps it's not there...
  8. Replies
    7
    Views
    1,098

    Profiler Problems

    I'm using gprof to profile my program. I run the program and produce the file gmon.out, which I interpret with gprof. The result is a text file with my profile data in. However, while there is data...
  9. Replies
    3
    Views
    1,147

    The latter is exactly what I wanted. Thanks,...

    The latter is exactly what I wanted. Thanks, laserlight!
  10. Replies
    3
    Views
    1,147

    Pairs & Constructors

    class MyClass{
    public:
    MyClass(int MyInt,char MyChar){i=MyInt;c=MyChar;}
    ~MyClass(){};
    private:
    int i;
    char c;
    };MyClass doesn't have an explicit default constructor. Say I want to...
  11. size() would tell you how many elements you have....

    size() would tell you how many elements you have. To refer to the last element of a vector use back().
  12. Thanks CodePlug, you were exactly right, it was a...

    Thanks CodePlug, you were exactly right, it was a problem in the destructor. I guess I should've checked there first...
  13. Array of Pointers + Deleting An Object = Problems

    Hi there,

    I have an array of pointers to objects, and I wish to delete an object pointed to by one of the elements. However, when I try to do this using delete MyPtrArray[2]; my program crashes at...
  14. Replies
    1
    Views
    926

    From Matrices to Graphics

    Hi there,

    I would like to produce a graphic from the contents of a matrix, specifically, a grid where the colour of each cell represents the value of the corresponding matrix element. Are there...
  15. Replies
    1
    Views
    4,497

    Returning the Residual

    Hi there,

    I would like to know whether C++ has an equivalent function to Fortran's intrinsic MOD(A, P), i.e. a function that returns the remainder of a division. I realise that such a function is...
Results 1 to 15 of 15