On Wed, Jul 9, 2008 at 10:31 PM, Paul David <[EMAIL PROTECTED]> wrote:
> I am trying to use parameters to the function writefile() to determine
> the filename of the file, the mode it opens the file in, and the data
> it writes to the file, but when i go to compile the source code i get
> the following errors:
> I'm a begginer to C and i don't know how to fix this problem
> I also intend to make the same changes to readfile()
>
> the source code is:
>
> #include <stdio.h>
>
> main()
> {
> writefile( "a+", "test.txt", "\nTesting...\n");
You are passing char strings into writefile here
> int writefile(int mode, int filename, int data1 )
> {
Yet here you declare writefile to take 3 int arguments. I think
instead you want const char *
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi