So I need to assign the scanned values to the variables palo and valor which belong to cartaswhich is a struct, and this one is inside another struct?
This is what I've got so far and i get an error "must have pointer-to-object type":
#include <stdio.h>
#define DIM 100
typedef struct{
char palo;
int valor;
}t_carta;
typedef struct{
int ncartas;
t_carta cartas[DIM];
}t_baraja;
int main(){
t_baraja b1;
t_carta carta[DIM][DIM];
printf("Cuantas cartas tiene su baraja? ");
scanf("%d", &b1.ncartas);
printf("Introduzca las cartas separadas por guiones (o4-e10-b1...):\n");
for(int i=0; i<b1.ncartas; i++){
scanf("%c%d%*c", &b1.cartas->palo, &b1.cartas->valor);
b1.cartas[i][i]=b1.cartas->valor;
}
return 0;
}```