New function

I know it's void, but i forget how it works
What's void? The new operator?
Last edited on
It goes something like this

1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
void func;

int main () {
//define func here
}
system("pause")'
return 0;

void func {
} 
Last edited on
Be a bit more specific, if you please?
How do i create my own function?
void func();

is a function called func that takes no parameters, and returns no parameters.

1
2
3
void func {
//Define function here, not in the middle of main
} 
Oh ok
Topic archived. No new replies allowed.