PIC microcontroller bit specific adressing beginner question.. PORTBbits.RB0 or just RB0?
Short answer: PORTBbits.RB0 is defined in xc.h, but RB0 is not.
Long answer: PORTBbits is defined in your microcontroller specific xc8 header file. For ex: pic18f45k22.h, it's included in xc.h. When you include xc.h, you also include your microcontroller specific xc8 header file, automatically.
You can check where the PORTBbits.RB0 is defined via right click on PORTBbits.RB0 and &quot;Go to Implementation&quot;. It opens your pic18fxxxx.h.

Easy way to use RB0, add #define RB0 PORTBbits.RB0 to top of your main file.
Better way to use RB0, create new header file and add all define statements for all I/Os. Then include it to your main file.