cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
little help plz
little help plz
Jul 3, 2011 at 2:55pm UTC
shoaib malik
(4)
//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
Jul 3, 2011 at 3:12pm UTC
Jul 3, 2011 at 2:57pm UTC
exiledAussie
(131)
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?
Jul 3, 2011 at 3:40pm UTC
LB
(13399)
The edited code is correct now, I believe.
Topic archived. No new replies allowed.