done.
Type: Posts; User: blazer26
done.
Yes you're right, its not really the EOF character, but I was told to just generate a new character that will will have frequency of 1 and that will represent that the file is over. I wasn't sure how...
I wanted to start on a huffman program and the first thing is to read from stdin and generate a simple frequency list. I read that it's nice to generate an additional pseduo-EOF and give it frequency...
I thought it would terminate if it sees that character. What should be the second parameter of strch() ?
[EDIT]
strch searches for a specific character, I"m trying to read in the entire file...
Well I would like it to only terminate if it hits the EOF, else continue reading each character from stdin, even if they're spaces or n.l. and store them in a char array. In the previous post, dwks...
#include <string.h>
#include <iostream>
int main()
{
char s[256], *p;
fgets(s, sizeof(s), stdin);
if((p = strchr(s,'\0'))) *p = 0;
I have the following:
#include <iostream>
#include <stdio.h>
#include <ctype.h>
using namespace std;
I'm trying to encode a file that is suppose to be read from stdin and a code file that has char value and it's corresponding binary encoding. I was wondering how would I read the data in and store it...
Hello I have a simple list that contains the follwing frequency table:
[file0]test 1,2,3.[file0]
10 1
32 1
44 2
46 1
49 1