Thread: void

  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, 01:01 AM
  2. Replies: 3
    Last Post: 05-13-2007, 08:55 AM
  3. game window rejected painting !
    By black in forum Windows Programming
    Replies: 4
    Last Post: 03-27-2007, 01: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, 05:40 AM
  5. Half-life SDK, where are the constants?
    By bennyandthejets in forum Game Programming
    Replies: 29
    Last Post: 08-25-2003, 11:58 AM