2 Topics

Member Avatar for
Member Avatar for efronefron

the problem is if you increase buff size and also change the buff size in a3_fgets_2 function call to more than 15, the program will run in an infinite loop, Can anybody tell me why? Thanks [CODE]#include<unistd.h> #include<string.h> char * a3_fgets ( char * str, int num, int fd ); …

Member Avatar for efronefron
0
252
Member Avatar for NicAx64

hi all, I'm new to the linux programming first of all. I just wrote this program. [code] #include <fcntl.h> #include <stdio.h> #include <iostream> #include <string> using namespace std ; int main(int argc,char **argv) { /* open the file */ string _path_name = "./file"; string _return ; int fd=open(_path_name.c_str() ,O_RDONLY); /* …

Member Avatar for mike_2000_17
0
142

The End.