COMP: missing string.h header for strlen.
This commit is contained in:
parent
31d03e8399
commit
3a34b35dec
|
@ -12,6 +12,8 @@
|
||||||
# include "kwsys_ios_iostream.h.in"
|
# include "kwsys_ios_iostream.h.in"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <string.h> /* strlen */
|
||||||
|
|
||||||
int testIOS(int, char*[])
|
int testIOS(int, char*[])
|
||||||
{
|
{
|
||||||
kwsys_ios::ostringstream ostr;
|
kwsys_ios::ostringstream ostr;
|
||||||
|
@ -24,7 +26,7 @@ int testIOS(int, char*[])
|
||||||
}
|
}
|
||||||
const char world[] = "world";
|
const char world[] = "world";
|
||||||
kwsys_ios::ostringstream ostr2;
|
kwsys_ios::ostringstream ostr2;
|
||||||
ostr2.write( hello, strlen(hello) );
|
ostr2.write( hello, strlen(hello) ); /* I could do sizeof */
|
||||||
ostr2.put( '\0' );
|
ostr2.put( '\0' );
|
||||||
ostr2.write( world, strlen(world) );
|
ostr2.write( world, strlen(world) );
|
||||||
if(ostr2.str().size() != strlen(hello) + 1 + strlen(world) )
|
if(ostr2.str().size() != strlen(hello) + 1 + strlen(world) )
|
||||||
|
|
Loading…
Reference in New Issue