void

This is a discussion on void within the C Programming forums, part of the General Programming Boards category; can anyone can explain detail to me what is the void in function,and give an example how to use it,thanks....

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    4

    void

    can anyone can explain detail to me what is the void in function,and give an example how to use it,thanks.

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    void literally means nothing

    a function declared like this :-

    void menu()

    is a function that does not return a value.This is called a procedure in other languages...
    whereas

    int menu(void)

    is a function that returns an int but takes no parameters.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 02:01 AM
  2. Replies: 3
    Last Post: 05-13-2007, 09:55 AM
  3. game window rejected painting !
    By black in forum Windows Programming
    Replies: 4
    Last Post: 03-27-2007, 02:10 AM
  4. msvc just ate one of my source files
    By Eber Kain in forum C++ Programming
    Replies: 6
    Last Post: 07-01-2004, 06:40 AM
  5. Half-life SDK, where are the constants?
    By bennyandthejets in forum Game Programming
    Replies: 29
    Last Post: 08-25-2003, 12:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21