I am producing some code to return the files and subdirectories of a root directory.
I am modeling my code after the code at:
While I have been successful, I don't like using code I don't fully understand.
I don't understand the line(s) with the following statements:
printf( ( c_file.attrib & _A_HIDDEN ) ? " Y " : " N " );
I understand the printf, the (condition ? true : false) structure.
I dont understand the condition being tested:
c_file.attrib & _A_HIDDEN
What does the & operator do here? I know the purpose it to return true or false pending if the file structure attribute is a hidden file but I don't understand how the & operator peforms.
Does anybody have any good links or explanations for me to learn how the & operator works and works in this context?