|
From: jag <won...@th...> - 2001-01-16 12:29:15
|
----------------------------------------------------- This email was delivered to you by the Free Internet, a Business Online Group company. Join TFI at http://www.thefreeinternet.net - the UK's premier 0800, free access ISP. ----------------------------------------------------- Hi, can anyone tell me where i'm going wrong with my coding? The code is at the end of the email. It's a simple program to practice function calls. I want to enter either a number 1 or number 2 to call seperate functions. When the functions are called it prints a simple message to say that the function has been successfully called, i can n't get the program to call the functions however! Can anyone advise me why? thanks in advance jag. #include <stdio.h> #include <iostream.h> int again; int enteb; void outpu(void); void inpu(void); int main(int argc, char *argv[]) { cout <<"monkey type (1) for function outpu (1) or (2) for function inpu"; cin >>enteb; if (enteb == 1) { outpu; } if (enteb == 2) { inpu; } cout <<"neither 1 or 2\n"; cout <<"wait for a number and enter pressed"; cin >> again; return 0; } void outpu(void) { cout <<"calling function outpu "<<enteb; } void inpu(int enteb) { cout <<"calling function inpu "<<enteb; } ICQ #103968172 |