Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 13, 2021 17:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/3714c63c32dfeeb2ec12ee0b1869158c to your computer and use it in GitHub Desktop.
Save parzibyte/3714c63c32dfeeb2ec12ee0b1869158c to your computer and use it in GitHub Desktop.
struct nodoCadena *nuevoNodo(char cadena[MAXIMA_LONGITUD_CADENA])
{
// Solicitar memoria
size_t tamanioNodo = sizeof(struct nodoCadena);
struct nodoCadena *nodo = (struct nodoCadena *)malloc(tamanioNodo);
// Asignar el dato e iniciar hojas
strcpy(nodo->cadena, cadena);
nodo->izquierda = nodo->derecha = NULL;
return nodo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment