Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~789 People Reached
Favorite Forums
Favorite Tags
Member Avatar for nightcracker

Hi! I've recently converted some C code to a bit more native C++. This included changing printf() statements to std::cout statements. However, some printf()'s are rather lengthy and annoyingly long (and human-error-prone) to write in std::cout. Example (and this one is a short one): C-style: [CODE]printf("ERROR %d: %s: %s\n", event, …

Member Avatar for mike_2000_17
0
726
Member Avatar for nightcracker

No error checking and other features, but a very basic .tar extracting snippet: [CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> #include <sys/stat.h> struct tarheader { // for parsing the tar headers char name[100]; char mode[8]; char uid[8]; char gid[8]; char size[12]; char mtime[12]; char chksum[8]; char typeflag; char linkname[100]; char magic[8]; …

0
63