Well the function name was given in the task position with the double pointer.
I will put my complete code in so its maybe easier to understand what I want to do
Code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
struct FluxCapacitor
{
unsigned char* c_string;
unsigned int value;
};
char* randomString() //Function for random character
{
unsigned char* character;
character = malloc(sizeof(unsigned char));
int i;
for (i=0; i<3; i++)
{
character[i] = (unsigned char) (65+(rand()%26));
}
character[3] ='\0';
return character;
}
void bubbleSortFluxCapacitorArray(struct FluxCapacitor** array, unsigned int n){ //Not in use right now
}
void printFluxCapacitorArray(struct FluxCapacitor** array, unsigned int n){ // Not in use right now
}
struct FluxCapacitor* createFluxCapacitor(){ // Instance of my struct
struct FluxCapacitor *Flux = malloc( sizeof(*Flux) );
Flux->value = rand();
Flux->c_string = randomString();
};
struct FluxCapacitor** createFluxCapacitorArray(unsigned int n){ //Function for the Array I want to initialize with n instance of the struct
struct Flux **array = malloc(n * sizeof *array);
return array;
};
int main()
{
}