Results 1 to 2 of 2
  1. #1
    Kallisti's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    深い碧の果てに
    Posts
    4,019
    Reputation
    52
    Thanks
    376
    My Mood
    In Love

    Virtual Class methods.

    Whats the difference between
    [PHP]virtual void example() { cout << "example\n"; }[/PHP]
    and [PHP]void example() { cout << "example\n"; }[/PHP]

    What does [PHP]virtual[/PHP] do?

    未来が見えなくて怖いから
    未来が見えてしまって悲しいから
    目を閉じて優しい思い出に浸ってしまう




  2. #2
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    It makes it virtual, this way you can override it when the class inherits another.

  3. The Following User Says Thank You to Void For This Useful Post:

    Hell_Demon (08-05-2010)