Some countries are more tolerant of black markets than others. You may not be able to exchange money at all in small towns or in the countryside. Money can also be exchanged in many hotels. Take a personal check and an American Express card. If you need more money, you can go into an American Express office with your card and write a check for traveler's checks.
Cash machines are also more common now in large cities.
In general, you can get a better exchange rate outside the country. Keep money and valuables in a money belt or pouch under your clothes. If you carry a bag for guide books, maps, brochures, etc., use one with a zipper and hang on to it. Leave your wallet and purse at home. The exception to this is in countries where pensiones and hotels need your passport for an hour or two in order to register you with the local police.