No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Say I have a class: [CODE]class foo { public: foo(); int len{return 1}; }; [/CODE] Then in main I have a class pointer: [CODE] foo *var[5]; [/CODE] My question is when do class pointers get initialized? Or do they not? How would one initialize them? |
|
I am writing a program that duplicates the command: [CODE]grep -cr Thread nachos/ | sort -t : +1.0 -2.0 --numeric --reverse | head --lines=5 [/CODE] My code: [CODE] #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <sys/wait.h> #define R_FILE "/proc/meminfo" #define GREP_EXEC "/bin/grep" #define SORT_EXEC "/bin/sort" #define … |