little help plz

//why the compiler shows error when we write cout<<gree[] instead of cout<<gree
#include <iostream>
using namespace std;
int main()
{
char gree[]="who r u :";

cout<<gree<<" "<<endl;

return 0;
}


yes, there was , sorry
Last edited on
Since you haven't defined gree as an object or an array, the complier should show an error in both cases. Is something missing from your code?
The edited code is correct now, I believe.
Topic archived. No new replies allowed.