Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What are these expressions ?

Status
Not open for further replies.

UncleAl

Programmer
Oct 24, 2000
1
US
I am just returning to C programming after a few years absence. Would appreciate your comments on the following two expressions which were passed as arguments in a function call:

(coordinate_set_t * )NULL,
(Line_t **) new_obj


Are the expressions in parentheses casts and was the type being casted defined in a typedef somewhere? Is it legal in ansi C to use a new type created in a typedef statement as a cast? Unfortunately this is part of a very large system and I have not yet found the prototype for the function and its arguments. Thanks.
 
Yes, that's a cast, and it looks like it is defined in a typdef. I'm reasonably sure that Ansi C allows casts to typedefs, since a typedef is really just a synonym of sorts.

Can't you just do a quick search through all the source files to find the definitions?

Russ
bobbitts@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top