Well, thank you for reading this question . Any answers or ideas are very appreciated .
I am new in C and i have a proplem . I want to write a program that accept some strings from the users , i want to use Dynamic Memory Allocation to a pointer depending on the length of the string entered by the user.
Here i have had a search in this forum and i found one solution is to ask the length of the string in advance
: Link To This Post. But can i have any other solution that i dont have to ask any thing, just let the users enter their strings and use it to allocate memory dynamically.
Thank you very much !
I am new in C and i have a proplem . I want to write a program that accept some strings from the users , i want to use Dynamic Memory Allocation to a pointer depending on the length of the string entered by the user.
Here i have had a search in this forum and i found one solution is to ask the length of the string in advance
: Link To This Post. But can i have any other solution that i dont have to ask any thing, just let the users enter their strings and use it to allocate memory dynamically.
Thank you very much !
Comment