Search:

Type: Posts; User: Polymorphic OOP

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    999

    Re: overloaded operators

    You can't overload operators that work with just built-in types as you are attempting. You'd have to encapsulate at least one of those arrays in a class and then overload operators for that,...
  2. Re: Ahaaa!!! Thank you Sebastiani!

    the thing is, you are making a check in code to see if the index is in range, but you aren't doing anything about it. the check might as well not be there if you aren't throwing an exception or...
  3. Replies
    6
    Views
    1,806

    You can do that in C++ -- you just have a member...

    You can do that in C++ -- you just have a member function you can call to deallocate the data prior to destruction, as you were saying with a "dispose" function. If you really want to do it in a...
  4. Replies
    6
    Views
    1,806

    Not really. Because of the nature of a stack it...

    Not really. Because of the nature of a stack it is impossible to get rid of something not on the top (otherwise it wouldn't be a stack). Imagine this as being a representation of the stack in memory...
  5. Replies
    6
    Views
    1,806

    Re: Explicitly calling destructor.

    not really as the object remains in memory, but initially, calling the destructor explicitly will work anyways -- sort of.

    The problem is that while you are explicitly calling the destructor, it...
  6. Replies
    3
    Views
    825

    he didn't do that -- you took the intar:: off the...

    he didn't do that -- you took the intar:: off the node type, which would give you the wrong type. node is a nested type inside the intarr class.

    The problem is that operator= (along with several...
  7. Ha, cool! I did a presentation like that for my...

    Ha, cool! I did a presentation like that for my high school senior year english class (we were allowed to choose any topic, but had to give an oral presentation for 40 minutes, so I did it on game...
  8. matrix3::V_FCT_PTR fct msvc++ .net 2003 is...

    matrix3<T>::V_FCT_PTR fct

    msvc++ .net 2003 is correct here -- that won't work because you are using the matrix3<T> template. You have to use typename when refering to a type nested inside a...
  9. Yeah, that's been happening to me a lot lately as...

    Yeah, that's been happening to me a lot lately as well. It's discouraging. What helps, for me at least, is developing projects in a unique manner and adding more abstraction, so even though stuff...
  10. Replies
    9
    Views
    1,127

    (*dict->entry)->trans->target order of...

    (*dict->entry)->trans->target

    order of operations!
  11. Replies
    7
    Views
    1,143

    That won't work because when you just say const...

    That won't work because when you just say
    const int A
    int class definition, that means you want A to be a const datamember of every instance of the class!

    Instead, you have to make it a static...
  12. Replies
    4
    Views
    1,518

    That's because you're using pointers and copying...

    That's because you're using pointers and copying the address. The assignment operator is called when you copy objects, not pointers. Don't dynamically allocate your objects here -- there is no reason...
  13. Replies
    14
    Views
    2,191

    .NET 2003 does take up a lot of space, but it's...

    .NET 2003 does take up a lot of space, but it's worth it. The compiler is MUCH better than that of 6.0 and .Net. It's incredibly more compliant to the standard than the previous versions. If you get...
  14. Replies
    4
    Views
    1,211

    Yeah, that's a C-style cast. It's result is like...

    Yeah, that's a C-style cast. It's result is like a mix of static_cast, reinterpret_cast, and const_cast -- by that I mean it will perform proper pointer arithmetic when casting via a hierarchy which...
  15. Replies
    4
    Views
    1,518

    While the latter is correct, and the former is...

    While the latter is correct, and the former is considered proper (though it should return a non-const reference), they're not actually the problem here.

    The problem is that the Length() member...
  16. Replies
    4
    Views
    977

    Ah, yes, I should have thought to mention that....

    Ah, yes, I should have thought to mention that. My mistake!
    I guess if you wanna look at it like that, then yeah, arrays can be considered passed by reference, though I guess it's kind of debatable...
  17. Replies
    4
    Views
    977

    Regarding functions, everything is passed by...

    Regarding functions, everything is passed by value in C++ unless you signify otherwise in the function signature (by passing via a reference or pointer, etc.)
  18. Actually, as of C99, C does allow inline...

    Actually, as of C99, C does allow inline functions as a part of the standard.
  19. Re: Is an inline function really the same as a macro?

    No. They are very very different. When working with inlined functions, think of it just like it's a regular function in terms of how the data is manipulated, with the desired effect of having the...
  20. Replies
    4
    Views
    1,336

    Re: 0 & Null?

    In C? Yes.
    In C++, No.

    In C, NULL is defined as 0 typecast to a void pointer, where-as in C++ it's literally defined as 0.
  21. HEY DUDES MICROSOFT HASNT DONE ANYTHING GOOD EVER...

    HEY DUDES MICROSOFT HASNT DONE ANYTHING GOOD EVER AND THEY SUCK. IM COOL CUZ I H8 MICROSOFT. OOPS I MEAN MICRO$OFT <-- LOLZ I USED A DOLLAR SIGN
  22. Replies
    48
    Views
    5,506

    Poll: *shudders* I'm so glad I don't follow that...

    *shudders*

    I'm so glad I don't follow that convention
  23. Replies
    48
    Views
    5,506

    Poll: haha, I really hope that was a joke.

    haha, I really hope that was a joke.
  24. Replies
    48
    Views
    5,506

    Poll: Spaces. I turn on the "turn tabs into spaces"...

    Spaces. I turn on the "turn tabs into spaces" option in VC++7.1 and set tabs to 2 spaces.

    Why?

    Because tabs cause all sorts of problems with porting to other IDEs. If you are using one IDE...
  25. Replies
    5
    Views
    938

    std::vector Can;

    std::vector<int> Can;
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4