• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Help me implement getline() in C!

beramodk

Member
Hello,

I'm trying to implement strcpy(), strcmp(), strlen(), strcat()
and getline() in C.

I've already implemented the four str***() functions, but i'm having trouble getting
the getline() function. getline() is supposed to get a string value and then return the
ENTIRE string, not just the first word it sees.
For example, if I type:

Hello World I hate you

getline() should return the entire "Hello World I hate you" string, not just "Hello".

I've been working hard on this so please help. Also, why does my C compiler give me
warnings on my str***() functions? I think it's because I programmed the functions
as if it was in C++.

Thx, and here's my code.

 
Back
Top