Talk:C/Typecasting

From Wikiversity
Jump to navigation Jump to search

Have you actually attempted to compile the code in this article? I have and it doesn't work. After may amendments it compiled, however, I will not amend the article because showing the assignment of a structure to an array is a Very Bad Idea. Quite rightly, the gcc compiler gives an error of incompatible types in assignment and refuses to compile cleanly. There are plenty of ways of showing the uses of type casts in C, this isn't one of them. --Mickraus 16:02, 29 January 2007 (UTC)[reply]

The article says "C does not allow to assign one data type to directy another data type" - this is not true. char can be assigned to int, int to long, int to float, etc. There are certain restrictions to certain assignments, but generally assignments to different data types are allowed, any necessary conversions are done silently. --Mickraus 22:31, 19 February 2007 (UTC)[reply]

Mickraus why don't you edit the page so it is correct? BeauMartinez 00:26, 16 January 2009 (UTC)[reply]