> -----Original Message-----
> From: dev...@li...
> [mailto:dev...@li...]On Behalf Of jag
> Sent: Tuesday, January 16, 2001 1:33 PM
> To: devc++ mail-list
> Subject: [Dev-C++] problem calling functions
>
>
> -----------------------------------------------------
> 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>
Bad attitude. :) Try to stick with C or C++ higher level constructs only.
> 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;
It should be outpu();
> }
>
> if (enteb == 2)
> {
> inpu;
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
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
>
|