Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delString does not set the pointer to NULL #2

Open
kwrtz opened this issue Feb 10, 2024 · 0 comments
Open

delString does not set the pointer to NULL #2

kwrtz opened this issue Feb 10, 2024 · 0 comments

Comments

@kwrtz
Copy link

kwrtz commented Feb 10, 2024

delString is called with a pointer. This pointer is passed by value. Therfore it is not possible to change the pointer to NULL.
void delString ( String *string )

The pointer must be passed by a pointer:
void delString ( String **string )

@kwrtz kwrtz changed the title you check a char for a string delString does not set the pointer to NULL Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant