C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 09-01-2008, 03:38 AM   #16
Registered User
 
Join Date: Aug 2008
Posts: 15
i've seen it nw and understood that it wont fail as you mentioned rather could make the maintenance difficult.
patil.vishwa is offline   Reply With Quote
Old 09-01-2008, 03:42 AM   #17
Kernel hacker
 
Join Date: Jul 2007
Location: Farncombe, Surrey, England
Posts: 15,686
Quote:
Originally Posted by patil.vishwa View Post
i've seen it nw and understood that it wont fail as you mentioned rather could make the maintenance difficult.
Correct, the cast itself isn't what makes it fail - it is the lack of including the correct header-file. However, not including the correct header file does happen from time to time.

If you are using an ANSI-compliant C compiler, it shouldn't complain about casting from void * to any other type. If you do get a warning or error, it is most likely because you are compiling with a C++ compiler.

--
Mats
__________________
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
matsp is offline   Reply With Quote
Old 09-01-2008, 03:43 AM   #18
Registered User
 
Join Date: Aug 2008
Posts: 15
Thanks a lot for the detailed explanation....!
patil.vishwa is offline   Reply With Quote
Reply

Tags
intialize, malloc

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting an error with OpenGL: collect2: ld returned 1 exit status Lorgon Jortle C++ Programming 6 05-08-2009 08:18 PM
Seg Fault in Compare Function tytelizgal C Programming 1 10-25-2008 03:06 PM
We Got _DEBUG Errors Tonto Windows Programming 5 12-22-2006 05:45 PM
const at the end of a sub routine? Kleid-0 C++ Programming 14 10-23-2005 06:44 PM
Dikumud maxorator C++ Programming 1 10-01-2005 06:39 AM


All times are GMT -6. The time now is 01:38 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22