0

In the following program it says that there is a conflict between my getline and the getline in stdio.h. I understand what it's saying because stdio.h has it's own getline function. What's confusing me is that this is the program that my programming book (The C Programming Language) is giving me to compile. Is there a way around this?

2
Contributors
3
Replies
23
Views
2 Years
Discussion Span
Last Post by deceptikon
1

getline isn't a standard function, so your book is correct. The problem is your compiler supports that function as an extension, so the easiest approach would be to change the name of the function in your code to something else.

0

My compiler supports that function as an extension. What does that mean? I'm using gcc.

1

Compiler vendors are allowed to add onto the standard C libraries. We sometimes refer to those additions as an extension.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.