Neurocysticercosis is a dangerous complication of a tapeworm infection. It is a condition that affects the brain and spinal cord. It can lead to:  Headaches. Dementia. Hydrocephalus.