Message-Id: <200302120543.h1C5hxC5015358@chac.its.uow.edu.au> Date: Wed, 12 Feb 2003 16:51:21 +1000 From: Y Chen To: "djgpp AT delorie DOT com" Subject: char in c++ X-mailer: FoxMail 3.11 Release [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Dear Sir, I got the following errors(The file is at the bottom): t1.cpp: In function `int main()': t1.cpp:18: incompatible types in assignment of `const char[6]' to `char[101]' t1.cpp:20:1: warning: no newline at end of file How to give a string to an char array directly? Thanks a lot for your help. Regards, Y Chen //t1.cpp #include #include #include #include #include // for memory error handling //#include #include // sleep //#include // struct termios #include #include #include #include #include #include int main(){ char c[101]; c="5.dat"; return 0; }