void

This is a discussion on void within the C++ Programming forums, part of the General Programming Boards category; what does the void command mean and how do you use it in programming?
Sorry for being such a noobie ...

#include <iostream>
using namespace std;
void example() // example is a function, but I have voided it so it returns nothing to main
int main()
{
example(); // this calls the function example
return 0;
}
void example() // you can now use the function as main has called it
{
code for exapmle would go here{
return; // return nothing to main as example is void
}

this is just one example of it's use in a function, but void has one golden rule:

Never use the command 'void main()' as main must ALWAYS return an integerger or int