If your baby latches on well, flat or inverted nipples shouldn't cause difficulties with breastfeeding, though you may find you are a little sore in the early stages.
About ten per cent of women have flat or inverted nipples. There are different degrees of nipple inversion and it's not unusual for a woman to have one inverted nipple and one that sticks out. In this case your baby may initially prefer the more accessible side, but it's important to be patient and persistent and put your baby to the flatter nipple regularly, too. If you can only get your baby to latch on to one side, it is in fact perfectly possible to breastfeed from one side only.
Preparing your breasts before birth with breast shells or nipple rolling exercises appears to make little difference. You often find that nipples that are flat in pregnancy stand out when your baby feeds because of the drawing out action of his jaws. However, in the early days of feeding, using a breast pump before feeds may help to draw out inverted nipples. Avoid engorgement as far as possible so that your baby can 'practice' while your breasts are soft -- your midwife or breastfeeding counsellor will be able to advise you on avoiding engorgement.
You will need skilled help with latching your baby on to the breast for the first few feeds, as your baby has to learn how to open his mouth really wide so that he draws in a deep mouthful of breast. It's worth discussing this with your midwife BEFORE you have your baby, so that you can be sure you get the right help once he is born.
Ultimately, an erect nipple is not essential to successful breastfeeding. Bear in mind that when a baby feeds he takes a mouthful of breast tissue and not only the nipple.