All pastes #275762 Raw Edit

Mine

public cpp v1 · immutable
·published 2006-12-11 20:02 UTC
rendered paste body
void Huffman::readCharacters(){    ifstream inFile;     inFile.open("huffman.txt");    char c;    //fill map with charcter and occurence    while( inFile.get(c) ){	    occurence[c]++;    }    inFile.close();    ofstream output;    output.open("characterCount.txt");    //write character and its ocurence to a file    for(unsigned char i = 0; i < occurence.size(); i++){    	if(occurence[i] != 0)    		output << i << ": " << occurence[i] << "\n";    }}