Re: [Dev-C++] unresolved external/linker error
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Carlos d. M. <cg...@wo...> - 2002-09-18 09:00:36
|
Oh, yes, iostream is C++, I should have notice it, stdio has no getline.
There are no C getline(), only C++, the one from iostream and the other w=
hich come
=66rom string and the other string classes. And get is either from iostre=
am.
You can make your own getline, overload it
void getline(char *buffer, int size){
char test =3D 'a';
for (int i =3D 0; i < size && test !=3D '\n'; i++){
buffer[i] =3D get();
test =3D buffer[i];
}
}
The Tone'ster escribi=F3:
> To recap :
>
> I was trying to use the "getline()" function in the GCC/GNU distro as i=
ncluded
> in Dev-Cpp v5 beta.
>
> I was getting an error from the linker.
>
> I looked into the <iostream.h>.
>
> This appears to be a C++ header.
>
> I am developing/compiling as 'C'.
>
> I tried it anyway.
>
> compile errors. to be expected.
>
> The GCC docs seem to imply that this is a <stdio.h> function that can b=
e used
> from 'C' code ?
>
> ???
>
> TIA,
> Tony
>
> --- Carlos Garc=EDa del Monte <cg...@wo...> wrote:
> > #include <iostream.h>
>
> =3D=3D=3D=3D=3D
>
> -------------------------------------------------------
> This SF.NET email is sponsored by: AMD - Your access to the experts
> on Hammer Technology! Open Source & Linux Developers, register now
> for the AMD Developer Symposium. Code: EX8664
> http://www.developwithamd.com/developerlab
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm
> https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|