People are being warned not to visit family members in hospital if they have had any illness over the previous 48 hours as the NHS struggles to cope with the numbers.