Oct 1, 2002 #1 hoggle Programmer Jul 13, 2001 124 US I have a very simple question I'm setting int omode = O_WRONLY | O_CREAT | O_APPEND; and I want to see what value it's given but... printf(omode); won't work any ideas?
I have a very simple question I'm setting int omode = O_WRONLY | O_CREAT | O_APPEND; and I want to see what value it's given but... printf(omode); won't work any ideas?
Oct 1, 2002 #2 victorv Vendor Aug 20, 2002 862 IT hi, more than super easy. The syntax of printf is printf( string, ... ) ; The first par may be a string as "ABC\n", and it prints and stop. Alt. it can be a format string as "%s" or "%d% or "%s %d" "%s %s %d ...... In these cases, after the format string, you have to follow variable to print printf( "%d\n", omode ) ; or printf( "The result is %d\n", omode ) ; or printf( "%s %d\n", "The result is", omode ) ; bye. Upvote 0 Downvote
hi, more than super easy. The syntax of printf is printf( string, ... ) ; The first par may be a string as "ABC\n", and it prints and stop. Alt. it can be a format string as "%s" or "%d% or "%s %d" "%s %s %d ...... In these cases, after the format string, you have to follow variable to print printf( "%d\n", omode ) ; or printf( "The result is %d\n", omode ) ; or printf( "%s %d\n", "The result is", omode ) ; bye.
Oct 2, 2002 Thread starter #3 hoggle Programmer Jul 13, 2001 124 US I thought it would be easy, I'm not a c programmer so...that will be my excuse for not knowing that thanks for the quick reply Upvote 0 Downvote
I thought it would be easy, I'm not a c programmer so...that will be my excuse for not knowing that thanks for the quick reply