Is it good practice to avoid declaring a pointer to BOOL type in objective C?
        Posted  
        
            by 
                Krishnan
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Krishnan
        
        
        
        Published on 2012-06-28T08:10:27Z
        Indexed on 
            2012/06/28
            9:16 UTC
        
        
        Read the original article
        Hit count: 255
        
objective-c
I read this question in stackoverflow.
The excerpt answer provided by bbum is below:
The problem isn't the assignment, it is much more likely that you declared your instance variable to be BOOL *initialBroadcast;.
There is no reason to declare the instance variable to be a pointer (at least not unless you really do need a C array of BOOLs).. Remove the * from the declaration.
1.Is there anything wrong in using a pointer variable even when I do not have to maintain an array of BOOLs?
2.I think even if avoiding them a good practice, it is not specific to objective-C and applies to all programming languages which has pointers.
Please answer my questions.
© Stack Overflow or respective owner