Thread: ; at end of function?

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    127

    ; at end of function?

    Is there a reason to have a ; after the } at the end of a function definition? Like

    Code:
    class Foo
    {
      public:
        void Bar();
    };
    
    Foo::Bar()
    {
      //some code
    };

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Doesn't do anything (null statement) and not required. They are only required after class, struct, and union definitions.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 15
    Last Post: 06-09-2009, 02:19 AM
  2. Replies: 2
    Last Post: 02-26-2009, 11:48 PM
  3. Print function: sending a function.. through a function?
    By scarlet00014 in forum C Programming
    Replies: 3
    Last Post: 11-05-2008, 05:03 PM
  4. Replies: 14
    Last Post: 03-02-2008, 01:27 PM
  5. Replies: 9
    Last Post: 01-02-2007, 04:22 PM