NASM - The Netwide Assembler

NASM Forum => Programming with NASM => Topic started by: Daniellebishop on February 06, 2023, 11:22:27 AM

Title: Why I am having a access STRUC members
Post by: Daniellebishop 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 (https://www.pmppayslip.net/)

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

Title: Re: Why I am having a access STRUC members
Post by: debs3759 on February 06, 2023, 01:03:57 PM
Please post relevant code, so we can better help you fix whatever the error is.
Title: Re: Why I am having a access STRUC members
Post by: Wilford81J 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 (https://www.credible-bh.com/)
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.