Re: [Dev-C++] unresolved external/linker error
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2002-09-19 02:08:20
|
Yes, fgets(buf,sizeof(buf),stdin) works ok to read from stdin. /Per W On Wed, 18 Sep 2002, Carlos Garc=EDa del Monte wrote: >=20 >=20 > Per Westermark escribi=F3: >=20 > > Forst of all, I didn't know that overload existed in C. >=20 > Sorry, my english is not perfect, I got the "license" of saying overload,= I noticed it > would be best not having it after sending. Er, today is my dumb day, it s= eems >=20 > > > > > > Second. Why write a new getline with - almost - the same function as > > the already existing fgets? >=20 > I have the cpluplus reference, and by it and the name fgets is for workin= g for files (I > should have add it) but I assumed the question was about stdin. >=20 > > > > > > Third. The sample code never terminates the loaded buffer after it find= s z > > newline character, or runs out of buffer space. >=20 > Ouch! I had the feeling of forgetting something. > buffer[size] =3D '\0'; > It shouldn't run out of buffer, the parameter is given. (well, size =3D l= ast non \0 index > +1) >=20 > (I didn't test it) >=20 > > > > I was trying to use the "getline()" function in the GCC/GNU distro = as included > > > > 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 c= an be 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 > > > > > > > > > > > > ------------------------------------------------------- > > > 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 > > > >=20 >=20 >=20 > ------------------------------------------------------- > 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 >=20 |