![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
need help
anyone and teach me how to save standard output to a file in a client/server socket. I know how to read them to the screen but i'm not quite sure how to save them to a file.
my read to screen file code: memset(line, 0x0, LINE_ARRAY_SIZE); while (recv(connectSocket, line, MAX_MSG, 0) > 0) { cout << " -- " << line << "\n"; if (send(connectSocket, line, strlen(line) + 1, 0) < 0) cerr << "Error: cannot send modified data"; memset(line, 0x0, LINE_ARRAY_SIZE); // set line to all zeroes i wanna save the display to a file for example abc.txt. really hope sum1 can help me, thanks. |
|
||||
|
No duplicate or cross-posting, please read the rules.
Proceed here: need help with sockets Thread closed. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|