Skip to content

Segmentation fault (core dumped) intentando ejecutar el programa #13

Discussion options

You must be logged in to vote

Claro, el segundo argumento del comando, en este caso "canvas.txt" es el nuevo .txt que crearás con lo que fprintees en tu programa. Como le estás pasando sólo el nombre del .txt (en este caso canvas.txt), lo que hace es crear ese archivo en la carpeta desde la que ejecutaste el comando.
De todas formas, así se hace difícil determinar el motivo del error, para hacerlo más fácil te recomendo ejecutar el comando anteponiendo valgrind. Por ejemplo, el que mandas quedaría:

valgrind ./rollercoaster input.txt canvas.txt

Con eso tendrás mucha más información del error y te será más fácil debuguear.

Por último, te recuerdo que el uso de IA está prohibido, así que no debes usar chatgpt, aunque sea…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@TomasRiquelme
Comment options

@Segismundios
Comment options

Answer selected by Segismundios
@TomasRiquelme
Comment options

@TomasRiquelme
Comment options

@tomastrivino
Comment options

@TomasRiquelme
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants