Author Topic: Why I am having a access STRUC members  (Read 7163 times)

Offline Daniellebishop

  • Jr. Member
  • *
  • Posts: 6
Why I am having a access STRUC members
« on: February 06, 2023, 11:22:27 AM »
Definitely has to be something stupid I'm missing but I can't get the correct value out of my CountedString.length as you can see from executing the code below. Appreciate any clues as to what I'm doing wrong as I've tried a dozen or so different things with no improvement.

In case it matters, I'm building this on NASM compiled on under Kubuntu  using the following commands: PMP Recruitment Payslip

nasm -f elf64 -l machine_core.lst machine_core.asm
gcc -m64 -o machine machine_core.o

« Last Edit: February 07, 2023, 05:42:19 AM by Daniellebishop »

Offline debs3759

  • Global Moderator
  • Full Member
  • *****
  • Posts: 224
  • Country: gb
    • GPUZoo
Re: Why I am having a access STRUC members
« Reply #1 on: February 06, 2023, 01:03:57 PM »
Please post relevant code, so we can better help you fix whatever the error is.
My graphics card database: www.gpuzoo.com

Offline Wilford81J

  • Jr. Member
  • *
  • Posts: 10
Re: Why I am having a access STRUC members
« Reply #2 on: February 11, 2023, 06:51:15 AM »
It's difficult to determine why you are having issues accessing the members of a struct without more context. Here are a few possible reasons for this issue:
Incorrect Data Type: If you're trying to access the members of a struct and getting an error message, it's possible that you have an incorrect data type. Make sure you're using the correct data type for the struct and its members.
CredibleBH
Uninitialized Struct: If the struct has not been initialized, you may not be able to access its members. Make sure you have properly initialized the struct before trying to access its members.

Access Modifiers: The members of a struct can have access modifiers, such as "private" or "protected," which determine who can access the member. If you're getting an error message, it's possible that the member you're trying to access has a restricted access modifier.
Syntax Errors: Make sure you're using the correct syntax when accessing the members of the struct. A common mistake is using the wrong operator, such as using a dot instead of an arrow.

If you provide more information about your specific situation, I may be able to offer a more tailored solution.
« Last Edit: February 13, 2023, 04:00:16 AM by Wilford81J »