i need the code of funtion "gets" in class "string.h".
thanks a lot

Recommended Answers

All 4 Replies

May I ask why?

doesn't matter why -- gets() is a horrible function anyway. Use fgets() instead of gets(). And if you really want the source code for that standard C function then download the gnu compiler source code.

commented: Agreed, but the source for gets() et al will be in libc, not the compiler itself +29

doesn't matter why -- gets() is a horrible function anyway.

Well maybe he wanted the source to improve the function and benefit C-programmers worldwide by inventing a failproof, idiotproof, fast-then-ever gets()-function :)

Or maybe you're just right.

commented: lol +29

i need the code of funtion "gets" in class "string.h".
thanks a lot

Download compiler source code base and search for gets api.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.