Link to home
Start Free TrialLog in
Avatar of bbcac
bbcac

asked on

"filename" is not an lvalue, but occurs in .... What does this mean?

I've written a little program that opens a file and writes to it after querying a database.


I am getting this error : ""filename" is not an lvalue, but occurs in a context that requires one"

What does that mean?
Avatar of bbcac
bbcac

ASKER

#include <stdio.h>
#include <string.h>

main()
{

        char filename[20];
        filename = "testing\0";

     
}

Even this simple program doesn't work... why not? Here is the error
"filename" is not an lvalue, but occurs in a context that requires one.
ASKER CERTIFIED SOLUTION
Avatar of PaulCaswell
PaulCaswell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial