Mam problem ze zrobieniem tablicy wskaźników na strukturę. Oto mój kawałek kodu
#include <malloc.h>
#include "stdafx.h"
#include <stdlib.h>
struct ZnakStruktura{
char pole;
int wartosc;
double osemka;
};
struct ZnakStruktura **tabWsk;
ZnakStruktura ** losowanie(int N){
tabWsk=(struct ZnakStruktura**)malloc(sizeof(struct ZnakStruktura*)*N);
for(int i=0; i<N; i++)
{
tabWsk[i]=(struct ZnakStruktura*)malloc(sizeof(struct ZnakStruktura));
tabWsk[i]->pole=97+rand()%26;
tabWsk[i]->osemka=8;
tabWsk[i]->wartosc=rand()%10000000;
}
return tabWsk;
}
.
.
.
W czym problem? Nie przypisuje mi N wskaźników na strukturę, a jedynie tworzy jedną strukturę. Pokażę wam log(w załączniku):