Thread: Impact of void on prototype

  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    25

    Impact of void on prototype

    hi, what is the difference between these?
    Code:
    int abc() {
    ...
    }
    
    int abc(void) {
    ...
    }
    what is the impact of void there?

    thank you in advance

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Try calling both of them with

    abc(123);

    Oh, and the answer is different in C++, just in case you don't know which language you're programming in.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    If you understand what you're doing, you're not learning anything.

  4. #4
    Registered User
    Join Date
    Jul 2006
    Posts
    25
    sorry that i didn't look at it, ty for answers..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. saying hello and 1st question
    By darksys in forum C Programming
    Replies: 12
    Last Post: 10-31-2008, 02:58 PM
  2. Interpreter.c
    By moussa in forum C Programming
    Replies: 4
    Last Post: 05-28-2008, 05:59 PM
  3. Pls repair my basketball program
    By death_messiah12 in forum C++ Programming
    Replies: 10
    Last Post: 12-11-2006, 05:15 AM
  4. msvc just ate one of my source files
    By Eber Kain in forum C++ Programming
    Replies: 6
    Last Post: 07-01-2004, 05:40 AM