int file

file = open("./some.txt", O_RDONLY);

Above line file=open giving me compile error:
'O_RDONLY' undeclared (first use in this function)

What is the problem here?

I am running linux and gcc 4.1.

What is the problem here?

I am running linux and gcc 4.1.

You're compiler doesn't know what O_RDONLY is.
Did you include fcntl.h?

thank you, that helped.

Merry Christmas