programming language c/c++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sbu180
    New Member
    • Mar 2007
    • 1

    #1

    programming language c/c++

    i am on the verge of learning c and i came across a problem that i do not know what the void command does if anyone in this world knows can you please help me out. confused!
  • arne
    Recognized Expert Contributor
    • Oct 2006
    • 315

    #2
    Originally posted by sbu180
    i am on the verge of learning c and i came across a problem that i do not know what the void command does if anyone in this world knows can you please help me out. confused!
    void is not a command in C, it is an incomplete type.

    It can be used to

    - declare functions that have no return type, take no arguments, or even both like
    Code:
    void foo( void );
    - as some kind of a generic pointer type (pointer to void) to and from which one can convert the value of any other pointer

    You'll find a more precise description in any good book on C.

    Comment

    Working...