Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    struct in a struct

    SDK Help
    0
    2
    221
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 19/11/2003 at 16:42, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.206 
      Platform:      
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      is it possble to have a struct variable in a struct?
      Iv'e just spent 2 hours porting some c++ header code into a coffee version, and i'm coming to the end of the porting and the last few structs have structs as variables (There are alot of structs). Because coffee can't directly read a data from a file into a struct (I'm making an importer plugin), I have had to do it byte by byte and add the data to my own structs. Iv'e managed to do it, but now I'm not sure what do to.... for the best (as in easy)
      Example problem:
      I would like to convert somethng like this into a coffee format (this is just an example i made up)
      struct Location
      {
       String Name;
       Long PhoneNumber;
      }
      struct Person
      {
        String Name;
       Location Area; 
      }
       
      As you can see the Person Struct has a variable of type Location. Because coffee variables are untyped, im not sure a way to do this.
      I *could* do this to get around the problem
      struct Person
      {
       var Name;
       var LocationName;
       var LocationPhone;
      }
      but the structures im dealing with have many members, and would require me to make large structures alot of times.
      I would just like know if there is an easier method to do this.
      Thanks

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 20/11/2003 at 02:35, xxxxxxxx wrote:

        It doesn't matter. I managed to do it by using class's instead of structures

        1 Reply Last reply Reply Quote 0
        • First post
          Last post