Thread: A...d....t

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    10

    A...d....t

    hiya
    im revising for an exam and just need some clarification....

    How would you write function prototypes in an ADT (Advanced Data Types) using c programming?

    Thanks

  2. #2
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    >How would you write function prototypes in an ADT (Advanced
    >Data Types) using c programming?

    Just as you normally would do. But I guess your problem is the ADT itself, how to connect it with the functions, like class-member functions are connected with the class in C++. You could give your ADT a name and use that name in the functions. If you have an ADT, for example a graph, then you could do something like this:

    bool add_edge (graph mygraph);

    How the graph-type itself is implemented shouldn't be independent from the prototypes, which are in fact interfaces.

Popular pages Recent additions subscribe to a feed