Using getline for a constant string : How can I use getline() function to read words form a line that I have stored in a string ?

For example:

`char ch[100],w[20];
cin.getline(ch,100);`


Now can I use getline to count the number of words in ch. I dont want to use a delimeter to directly count words from ch. I want to read words from ch and store them in w. 

I have tried using ch in getline function as a parameter.

Please help me.