does someone know a code in c that will send a complete ASCII file in 128 byte packets to another file? So The sender takes the ASCII file as input and sends a 128 byte packet on the data queue
R3Slick
-4
Light Poster
Recommended Answers
Jump to Postopen the file in binary mode then read it 128 bytes at a time
FILE* fp = fopen(arg[2],"rb"); char buf[128]; size_t nBytesRead; while( (nBytesRead = fread(buf, 1, sizeof(buf), fp)) > 0) { }
All 4 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
R3Slick
-4
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
R3Slick
-4
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.