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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. fyrdman

    struct with a pointer to a member of another struct?

    DaveSinkula, Maybe something interesting would be cautions of where you can go wrong with void * (or would that be too unbounded of a question to ask of C? )
  2. fyrdman

    struct with a pointer to a member of another struct?

    *That* link is very helpful, but not yet, as I will have to read it 3-4 times I think. [dazed] Thanks! OK, for array a pa = &a[0] is the same as pa = a and pa = (a+0) but pa = &a is not *exactly* the same as pa = a. I’ll have to check over my code in a new light. I have no...
  3. fyrdman

    struct with a pointer to a member of another struct?

    DaveSinkula : More precisely it works on project code my C18 compiler. Maybe my there is a subtle difference between my project and sample code. Maybe there is a tiger trap waiting for me in my code. So, if a is an array, then pa = &a[0] is the same as pa = a, but what about pa = &a...
  4. fyrdman

    struct with a pointer to a member of another struct?

    That got it working! (I left the & in) Dang, I was so fixed on going through the top struct, that I didn't consider going through the lowest struct. Blind! Since I have to know the whole "path" to the lowest struct via the highest, there is actually *less" dependency just referencing the...
  5. fyrdman

    struct with a pointer to a member of another struct?

    Err, struct X { struct X1 *#; struct X2 *#; struct X3 *#; …. }; struct Y { struct Y1 *#; struct Y2 *#; struct Y3 *#; …. };
  6. fyrdman

    struct with a pointer to a member of another struct?

    I beg patience as I try this again, I use a set up where each static object consists of a struct of pointers to various struct struct X { struct X1; struct X2; struct X3; …. }; struct Y { struct Y1; struct Y2; struct Y3; …. }; The Problem: This has worked very well for me, but now I...
  7. fyrdman

    struct with a pointer to a member of another struct?

    OK, DaveSinkula, What you have is pretty much what I tried, and should work. But let’s take it you the next notch to what I really need. I deal with the fact that I can’t have RAM and ROM in the same struct, I and another layer of struct that points to my RAM struct and ROM struct for each...
  8. fyrdman

    struct with a pointer to a member of another struct?

    ChipperMDW, You are giving me very educational suggestions, but we're not there yet. >How about just writing a function that takes a struct B * >and returns the address of its b member? That is a very interesting idea. But I neglected to enphasize that the initialization must be in ROM. To...
  9. fyrdman

    struct with a pointer to a member of another struct?

    chipperMDW: Background: I have been an assembly programmer of 5 years experience. My C is completely self-taught out of Kernighan and Ritche and only have a couple of recent embedded C projects under my belt (C51 and PIC16). I have not used the code you suggested because I expect information...
  10. fyrdman

    struct with a pointer to a member of another struct?

    I have a project where I want to have the two general types of structures: struct A { … unsigned char *a; … }; struct B { … unsigned char b; … }; The general idea is that...

Part and Inventory Search

Back
Top