learning c help need for a dummy
hi i am new to this forum and this being my last resort for help because y i am learning how to program in c but very very slowly. i really need help .
this is my code .all i am trying to do is call a void function from my swtich statment to print a sentence get random numbers . can someone please point me in the right direction.
using mircale c to compile. thats my error ?
.c:\program files\miracle c\assigment4exper.c: line 37: Parse Error, expecting `SEP'
'void getnum() { printf("1 get Random numbers\n")'
aborting compile
Code:
#include <stdio.h>
void dispMenu(void);
void getnum(void);
void main()
{
int select;
do{
dispMenu();
printf("Please enter a selection: ");
scanf("%d",&select);
switch(select)
{
case 1: getnum();
break;
case 2: disNumbers();
break;
default: printf("failed\n");
}
}while(select>=1&&select<=2);
getch();
}
void dispMenu()
{
void getnum()
{
printf("1 get Random numbers\n");
}