*URGENT* Why won't it let me use Console.WriteLine() ???????

  • Thread starter Thread starter blackbearox
  • Start date Start date
B

blackbearox

Guest
My program is not done but can someone please tell me why I can't use Console.WriteLine in the Main class?

using System;
using System.Linq;
using System.Collections.Generic;
using System.Collections;
using System.Text;

namespace Huffman_Codes
{
class Main
{
Console.WriteLine("blah blah");
}
class Node : IComparable
{
public char Character { get; set; }
public int Frequency { get; set; }
public Node Left { get; set; }
public Node Right { get; set; }

public Node (char character, int frequency, Node left, Node right)
{

}

public int CompareTo (Object obj)
{

}
}

class Huffman
{
private Node HT; // Huffman tree to create codes and decode text
private Dictionary<char, string> D; // Dictionary to encode text
private string S;

// Constructor
public Huffman (string strings)
{
S = strings;
}

// Return the frequency of each character in the given text (invoked by Huffman)
private int[] AnalyzeText (string S)
{
int[] F = new int[S.Length];
var characterCount = new Dictionary<char, int>();
foreach (var ch in S)
{
if (characterCount.ContainsKey(ch))
characterCount[ch]++;
else
characterCount[ch] = 1;
}

int index = 0;
foreach(var val in characterCount)
{
F[index] = (val.Value);
index++;
}

return F;

/* foreach (var pair in characterCount)
{
Console.WriteLine("{0} - {1}", pair.Key, pair.Value);
}
Console.ReadLine();
*/
}

// Build a Huffman tree based on the character frequencies greater than 0 (invoked by Huffman)
private void Build ( int[] F)
{
PriorityQueue<Node> PQ;
}

// Create the code of 0s and 1s for each character by traversing the Huffman tree (invoked by Huffman)
private void CreateCodes ()
{

}

// Encode the given text and return a string of 0s and 1s
public string Encode (string S)
{

}

// Decode the given string of 0s and 1s and return the original text
public string Decode (string S)
{

}


}

}

Continue reading...
 
Back
Top