I have a structure Defined in the Header file for a class i am working in, and i am trying to use the Struct in one of the methods of the class. It looks basically like this:
struct example
{
     double a;
     int b;
     ...
};
in the header above my class definition, and then in the cpp file, i have:
void exampleclass::test(){
    struct example *teststruct;
    teststruct->a = 0; //This line causes a access violation
}
why do i get an error here? Im sure im doing something clompletly wrong here, and i must say im a huge structure rookie.
 
     
     
    