Sorting of Vowels and consonants via Linked Lists

Hi Guyz.
I've been given a task to write a program that prompts the user to input a text, and the program calculates the number of vowels & consonants, then sorts the text on a table in ascending order with respect to vowels/consonants (as the user desires). And lastly, print the frequency of each word contained in the text.
Here's how it's required to look like:

Enter Text:
I Love c plus plus.

Original Text analysis.
|words| |Consonants| |Vowels|
I 0 1
Love 2 2
c 1 0
plus 3 1
plus 3 1

Sort words in text:
1) By increasing number of consonants
2) By increasing number of vowels


words| |Consonants| |vowels| |Frequency|
I 0 1 1
c 1 0 1
Love 2 2 1
plus 3 1 2
plus 3 1

Please help out guys, i need to submit this on wednesday....i really appreciate for the opportunity. Thanks.

Where are you getting stuck?
I'm actually new to lists. Now having problems with passing strings/characters into the list.
and as for the sorting aspect, don't really know how to get around it...
Here's what i've done so far:

#include "iostream"
using namespace std;

struct spisok //(spisok, meaning LIST);
string rext;
spisok *end;

void enter_Text(spisok *&startPtr, spisok *&current, int j);
void display_Text(spisok *$startPtr);
void sort_Text();

int main()
int j=1;
spisok *startPtr=NULL;
spisok *current;
enter_Text(startPtr, current, j);
return 0;

void enter_Text(spisok *&startPtr, spisok *&current, int j)
spisok *temp, *temp2;
for (int i=0; i<j; i++) {
temp= new spisok;
cout<<"Enter Text: "<<endl;
// cin.get(temp->rext, j);
if (startPtr==NULL) {
else {
while (temp2->end!=NULL) {

void display_Text(spisok *$startPtr)
spisok *temp;
cout<<"Text entered: "<<endl;
while (temp!=NULL) {

And after running that, here's what it produces:

Enter Text:
I love programming

Text Entered:

How do i go about this)
Last edited on
Topic archived. No new replies allowed.