(no subject)

michael michael8110 at terra.com.br
Tue Aug 10 23:41:14 PDT 2004

> Glad to see you are making heads and tails of all this!!  It's very nice
> to see someone so dedicated to learning a language, and doing it by
> testing and discussion.
It is likewise very nice to get so much support from all of you,thanks  
very much again!
Sooo,finally you've admitted it!
  " For char pointers, which
ar[3] ends up being, the language itself knows to actually output the
string it points to."
So the simple question remains(and that,Björn,is the point)
why does g++ applied to the following
using namespace std;
class car
char itsName[20];
car(char a[20]){itsName=a;}
int main()
{car c("citroen");
return 0;

test7.cpp: In constructor `car::car(char*)':
test7.cpp:6: error: incompatible types in assignment of `char*' to  
after all doesn't "the language know" that when it sees a char* it's the  
string the poor devil means?I mean,if i do
char a[20]="citroen";
i'll get the string as seen above...so why can't the constructor (car(char  
a[20]){itsName=a;} )do the same,since it already admits itsName by itself  
stands for a char[20]?Either both a and itsName are char* or  
char[20].Oh,my god...I'm currently reading a novel written in 1920 that's  
written in beautiful english ,and i guess some of it would express the  
general feeling here :' a cessation of proceedings on this matter would  
probably be in order' :-)
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

More information about the lfs-chat mailing list