View Single Post
Author Message
LinLinLin
Senior Member
Join Date: Sep 2021
Old 04-25-2024 , 12:32   why this code run
Reply With Quote #1

PHP Code:
enum struct test
{
    
int  type;
    
char info[128];
    
char file[128];
    
char name[128];

    
ArrayList looking;
}

ArrayList mytest = new ArrayListsizeof(test) ); 
By reading and writing to this arraylist i am sure the code work well.
My question is why we can use sizeof to a enum struct which contain a arraylist? It's size is dynamic!

Last edited by LinLinLin; 04-25-2024 at 12:33.
LinLinLin is online now