#include "libvecmat.h" vector craftvec(int n, double *arrayin) { //There will be hell to pay if arrayin is not an array of size n. //Provided hell is like a segfault... //Recall the vector prototype: //typedef struct vec {int size; double* elements;} vector; vector new; int i; new.size = n; new.elements = (double *) calloc(n,sizeof(double)); for (i=0; i