So now that I do unstand, even though I did change it, what else can I do to have it run?
Thank You
So now that I do unstand, even though I did change it, what else can I do to have it run?
Thank You
Perhaps you should request this thread be moved to the windows programming board?
I understand the Main now, What else do I need to do to fix the program so that it will at least run so that I can see what else is wrong?
thank You
Can someone Please Help me?
Thank You
No need to bump the thread. The reason that I've not replied further is because you clearly have a lack of understanding of very fundamental concepts of the C programming language, and I don't have a spare few hours to explain them to you. That might be the reason why others haven't replied. Suggest you read at least a few chapters of an introductory C book, especially on the ones pertaining to functions.
I have read, but not really understanding it right. I have six books on the subject, and more papers printed from the web on functions. This is why I am here asking for help. Could you try and spend some time helping me?
Thank You
A C program with multiple functions might have this structure:
The useless program above is valid, and explains how a correct looking program with use of a function is typically strutured. Yours is all over the place. Clearly declare your functions outside of any other functions, clearly have your main, clearly define your functions outside of any other functions. Don't put blocks ( { and } ) outside of functions.Code:/* Some includes, for needed header files */ #include <stdio.h> /* Some function declarations */ double foo(int, int, int, double); /* A main function (in your Windows environment, apparently _tmain) */ int main(void) { double x; /* some code that does stuff, calling your functions */ x = foo(1,2,3,4.0); return 0; } /* the definitions of functions you declared above */ double foo(int a, int b, int c, double d) { return a + b + c * d; /* made up pointless function */ }
Notice also my indenting, it clearly shows what should belong where. If you still can't work out how to do this, post your code and comment liberally the structure. Before each function declaration and definition, and before each block of code, state what function it belongs to, then the problem should be self-evident.
Ok I just printed out what you wrote and will try to see if I can fix what is wrong. I know I will be back.
Thank You