×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

What are these expressions ?

What are these expressions ?

What are these expressions ?

(OP)
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.

RE: What are these expressions ?

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
http://home.earthlink.net/~bobbitts

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close