It looks strange that you try to assign a fix value to a pointer....

birdincage (birdincage)
1. It looks strange that you try to assign a fix value to a pointer, no matter it points to an int or a char. Since memory is such a complicated place, you'd better do not access it so directly unless you have to.

2. C and C++ do have implicit data conversion, but never use it. Don't rely on the compiler. And different compilers may have different criteria. Try to make your program simple and have less 歧义, and portable. When one does programming in a big project, the more important thing is to make your program easy to be read and understood. The fewer tricks you use, the better. Things might be different if you are learning C++ to take a test :-) You have to grasp every corner of it :-)
(#108580@0)
2001-6-21 -05:00

回到话题: show u another dark spot of c

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论

URL:   
http://www.rolia.net/zh/post.php?f=0&p=108580