count - c++ linked list counting letters -


c++ linked list counting numbers

struct letternode {

char letter; size_t frequency; letternode* next;  letternode(char ch, size_t frq, letternode* ptr) { letter = ch; frequency = frq; next = ptr; }  const string tostring() { return ("letter " + to_string(this->letter) + " occured: " + to_string(this->frequency)+" times."); } 

}; c++ linked list counting numbers

what 2 functions marked do?

letternode(char ch, size_t frq, letternode* ptr) set letternode object, method (function) called constructor.

const string tostring() returning string information letternode object can't sure don't know to_string doing.

another question size_t frequency in letternode struct increase , shows how many of them in string?

frequency not increasing in code provided set when letternode creating new object in void insert(char ltr, size_t frq)

i sorry answer not solved problems feel free add important information code main function.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -