In bear country, it is advised to not keep any kind of food in the tent or even product with a strong smell such as toiletries, tooth paste, parfume, cosmetics, etc). Make sure you don't wear any on yourself either whan you camp! Hanging food in trees has to be very well done with the proper techinque because most bears climb trees. Black bear in North America are actually very good climbers. A lot of people use techniques such as hanging your food with counter balances. You can not just hang your food from a branch it will make things worst. Note that bears has a sense of odor 8 times more developped than dog so they'll smeel your food from miles away. If the breas are a serious problem and you have to carry some kind of food, I would recommend to stick to campground as they usually have bear-proof boxes (at least in North America they do). Be aware that post hibernation time is the most dangerous time to camp in bear countries.
If camping in camgrounds is still an issue and that you need to carry food and for an extended period of time you might want to consider to carry a bearproof container. I never did because they are heavy and I never traveled long enough in bear countries, but I know they do exist. Double wrap anything that has an odor in sealed ziploc bags.
Another advice is to contaxct the local wildlife authority and they will tell you where you can find camground and which area are not safe.
I hope this helps.