Reboot when declaring object inside main method

Hello every body.

I have created my own objects and when I was testing some configuration I realized about the following:

1. When I declare the objects outside the main method (as global) the program runs perfectly.

2. When I declare the objects inside the main method the microcontroller reboots. 

What could be the alternatives for this or how can I check what the reason of the reboot is?

Parents Reply Children
Related