View Single Post
  #13  
Old 04-19-2002, 09:24 AM
cduckman
Fire Beetle
 
Join Date: Apr 2002
Posts: 12
Default Test program written

I got a sec to write this up.


#include <iostream.h>
#include <netdb.h>

void main()
{
if (gethostbyname("localhost") == NULL)
cout << "Localhost failed.\n";
else
cout << "Localhost worked.\n";
if (gethostbyname("127.0.0.1") == NULL)
cout << "127.0.0.1 failed.\n";
else
cout << "127.0.0.1 worked.\n";
}



Returns "worked" on both.
/boggle
/think
/boggle
/sigh
/cry
/camp


Edit:Er... Well.... I had indentations when I copied it in here... *laugh* too tired to fix it.
Reply With Quote