QUOTE(triplecode hammerblow @ 3 Aug, 2007 - 02:46 AM)

Hey people,
I've coding for sometime now..but it's a little confusing using bloodshed's dev c++..can you tell me if this happens on all compilers?
CODE
int main()
{
char words[10],*char_pointer;
cout<<"enter words";
cin>>words;
char_pointer=words;
cout<<char_pointer;
return 0
}
According to my textbook it's supposed to print the contents of the array...but it doesnt..it doesnt do it,if there's a space in between?!?! it stops at the space..but it prints the contents when I specify the sentence in the program
And....can I compare spaces??...I need to print the words of a sentence in the reverse order....i'm trying to break up the sentence by stopping at white spaces...but it doesnt seem to compare spaces

I use the same Compiler. I'm sure you know to include "#include<iostream.h>"
As other people have stated, use: "cin.getline()" for multiple words.
Below I have taken your code and changed minor things. You still enter only one word to be printed to the screen.
CODE
//dreamincode.net
#include <iostream.h>
int main()
{
char words[10],*char_pointer;
cout<<"enter a word";
cin>>words;
char_pointer=words;
cout<<char_pointer;
system("Pause");
return 0;
}
Hope that helps a little.