Not much help, but =>
^-^
Type: Posts; User: taisao
Not much help, but =>
^-^
(is my question difficult to understand or so? (well, I'm not good with English))
but after setvbuf for stdin, the old buffer of stdin should already be freed right? Or is the buffer for stdin...
I have another question :-)
after modify some "settings" with the file pointer stdin, like setting buffersize (and what more you could do with it ...). Is there a way to change it back like when...
thank you MacGyver and Salem.
And I do manage to get a error :-D
like this
what I have done is setbuf(stdin,10) in main and use atexit to register a function call to get a very long input...
I still doesn't quite understand it, (yeah slowww),
can you give a simple program example that create the error?
and is it not true that each program have it own stdin and stdout ?
hello, from the man page
I don't quite understand why that is illegal,
can anyone explain more about it please.
but how to solve it when it is unknown wether the stdin buffer is empty or not empty?
my solution is to set buffering to NULL before getchar(), but I don't think that is a nice solution
does that work when the input stream is empty?
oeps, I thought file descriptor is the same as file pointer,
thank you,
Hi,
I have this x86 assembly code (I use it to flush the input away)
pushl stdin
pushl $STRING_LEN
pushl $long_string
call fgets
(it seems to works, because I don't have a segmentation...
I do get the output => :file: No error
I have try to search (with indexing service disable) the entire c partition, but nothing found, I will try yours tips of setting the date a year further
well, this is what I have
int saveListNewName(char *filename)
{
FILE *fptr;
int i;
char *fileAddress;
the user can enter a string like this: :abcd
(with the ":")
where could the file be saved? cause it's saved succesfully and I can open it with the same program, but I can't find it...
sorry,
cause I couldn't find the reference for the function (at http://www.cppreference.com/ and http://www.acm.uiuc.edu/webmonkeys/book/c_guide/ )
could you give me a better reference site...
okay,
I have another question :)
I have this
char *filename = read_dyn_string();
fptr = fopen(filename,"wb");
let say the user can enter: "1234.dat" , "c:\1234.dat" when asking by the...
hi,
can anyone tell me how to get the full file address from a file pointer?
I use the dev-c++ compiler and when I ask the user to enter the filename to save the data to
and the user just...