get() function

I am have alot of trouble understanding the get()function
I need to receive from user input a list of characters and then output them. These characters are ASCII for letters and number and the "\n" and tab...

this will be used later for another part of code where I compare them and figure out there frequence within the list "how many times they show up.

However, right now I just want to know about receiving from user input.

int maxinput=3000000;
char input[maxinput]; //

for(int i=0; i<?;i++)
{
input[j]=cin.get() // i don't know here but I would like it put in a char array
j++
}

I know I will write a frequence function, which will be a loop

int k=0;
int l=0;
char counterarray[maxinput];

for(int h=0; h<maxinput; h++)
{
for(int i=0; i<maxinput; i++)
{
if(input[k]==input[l])
{
counter = counter +1;
l++; // incremetn input[] *for loop 2
else
l++; // increment input[] *for loop 2
}
}
counterarray[g]=counter;
k++; // increment input[] *for loop 1
g++; // increment counterarray[] *for loop 1
counter=0; // restart counter for next comparison.
}


I know my problem is getting the characters in the array from user input then know how to end the input due to getting all numbers and letters the return and the tab. I feel I am close but I don't understand.

Thank-you for your help! Sorry if the is not helpful enough it is my first time using this site.
Topic archived. No new replies allowed.