I am writing a custom \"vector\" struct. I do not understand why I\'m getting a Warning: \"one\" may be used uninitialized here.
Warning: \"one\" may be used uninitialized
This is my vector.h fil
When you use Vector *one you are merely creating a pointer to the structure but there is no memory allocated to it.
Vector *one
Simply use one = (Vector *)malloc(sizeof(Vector)); to declare memory and instantiate it.
one = (Vector *)malloc(sizeof(Vector));