English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

in fopen(filename,"r") instead of r how can i use numbers?

2006-08-18 20:12:55 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

char my_r[] = {0x72, 0x00};
fopen(filename, my_r);

but why would you want to?

2006-08-18 20:21:21 · answer #1 · answered by selket 3 · 0 0

I am guessing that what you are asking of this
rather than use "r"/"w" etc, you want to use O_RDWR/O_WRONLY etc.
Those are flags which have numerical values specified in header files.
I am not sure you should be specifying those numbers at all... since different compilers may interpret them differently. You are better off using "r" etc or maybe O_RDWR at the most

2006-08-19 04:13:09 · answer #2 · answered by Neil 5 · 0 0

fedest.com, questions and answers