What does void mean?

Hi Everyone! I sort of understand how to write functions however, I'm having trouble understanding void.

For my assignment I have to do use a previous assignment I did and break it into the following functions:

// get the number of rows from the user, assuring legal and odd,
// then return it to the caller
int GetNRows( void );
// draw the shape, using helpers as needed (described below)
void DrawShape( int nRows );
// calculate number of spaces given current row and row number
int nSpaces( int nRows, int row );
// calculate number of stars given current row and row number
int nStars( int nRows, int row );
// print n copies of character c on the current row
void PrintChars( int n, char c );

I'm having trouble understanding what I have to do for the functions that have void written in them (which is the first, second, and last function). Could someone explain to me what void means in the first second and last function? I don't need necessarily need help writing the code, just understanding what I should be doing inside the functions with void in it. Also some tips on how to approach this correctly. Thank you for any help in advance!
Last edited on
( void ) == ()
void in first function, it means it has no parameter.


void in last function means, it doesnt return anything.
in your prototype, it only use for printing chars.
Topic archived. No new replies allowed.