Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.09 seconds.

  1. Re: Simplest Problem but i am unable to understand it, WHY???

    I don't know much about c++, but I would like to correct one thing from the Java perspective:



    A Mercedes can be referenced as a Car, like so:

    Car car = new Mercedes();

    However, without...
  2. Re: Simplest Problem but i am unable to understand it, WHY???

    Yes, you are. That's the point. The compiler has no way to know what you're storing in the superclass variable. It has no way to know what methods the subclasses are going to have. So even though you...
  3. Re: Simplest Problem but i am unable to understand it, WHY???

    Okay. I still had to fix your method declarations, but good enough.

    The reason it's saying that the add() method is not defined in type A is because, well, it isn't. And your 'a' variable is of...
  4. Re: Simplest Problem but i am unable to understand it, WHY???

    Like I said. We can help you when you provide an SSCCE. Talking in theory is fine, but it is a thousand times easier when we have some common working code to which we can refer. Plus that code...
  5. Re: Simplest Problem but i am unable to understand it, WHY???

    I just counted 20 compiler errors in that code. Are you sure everything works how you think it does? Fix them and create an SSCCE that demonstrates what you're talking about, and we'll go from there.
Results 1 to 5 of 5