THANK YOU IT WORKS NOW!!! I thought I was using malloc wrong
Type: Posts; User: kuroholic
THANK YOU IT WORKS NOW!!! I thought I was using malloc wrong
I'm trying to write a program that combines all command line arguments into one string.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
int main(int argc,...
ok I wrote something, but it still doesn't work
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_LINE 1024
#define MAX_CHARACTER 128
thank you so much! I was messing around with my code, should've been != and not ==. I was going to use lineCount to count the total number of lines, is there a smarter way of doing it?
How can I do that? This is my code right now:
#include <stdio.h>
#include <stdlib.h>
#define MAX_LINE 1024
#define MAX_CHARACTER 128
int main(void) {
Hi,
Is there a way to count unique lines? So for example if I do this:
./count
one
two
one
one
two