DNS request timed out.
timeout was 2 seconds.
Server: google-public-dns-b.google.com
Address: 8.8.4.4
DNS request timed out.
timeout was 2 seconds.
Name: www.a.shifen.com
Address: 220.181.111.147
Aliases: www.baidu.com
I think it should be output<td>DNS request timed out.</td>.....but it always output </td>NSDNS request timed out. I can't slov this problem.Everybody, please! Copy this program and the file content, compile and run it and post the output here, so i can know is it just I encouter the problem. Everybody know how the problem benn, please help.
I'm Chinese. My english is bad. If you can't understand my words, please send email to me. My email: linjielig@hotmail.com.
Thank you everybody.
Thank you. Your result is right. But I got not the same as you. When I run the program I got
</tdDNS request timed out.
</tdtimeout was 2 seconds.
</tdServer: google-public-dns-b.google.com
</tdAddress: 8.8.4.4
</td
</tdDNS request timed out.
</tdtimeout was 2 seconds.
</tdName: www.a.shifen.com
</tdAddress: 220.181.111.147
</tdAliases: www.baidu.com
EEEEEEEEEEEEEEEE
Test
I use windows xp and the compiler is cygwin's g++, what about you? Thank you very much, your result prove my program is right. But something wrong with the compiler or the system! You are a kind man.
Thank you Jackson Marie. But your reply is not the problem I ask. The "</td" should appear the end of the sentence, but now it appear the begin, that's the key. Do you know why?
I used the Visual C++-Compiler of the Visual Studio 2010 IDE.
First try to cout << the lines without the td's, so remove the line //s[i]="<td>"+s[i]+"</td";
This should get you an idea of whether your strings are loaded correctly and no extra endl appears before the table.
Then try what the output is with: s[i]="<td>"+s[i];
Maybe the "+" operator is not working properly.
I never used cygwin so I can't tell you what the problem is here. It just seems that the problem is in this particular line. As an alternative you could use a concatenate function that adds string together.
I have know what cause this. Thank you everybody. The file "n" generate on windows's dos command "tracert www.baidu.com" and the compiler is cygwin's G++,it seems they are don't compatible very well. I copy the "n" file to Centos, the result is same. Then I use the command "tracert www.baidu.com > n" on Centos, I run the program again, the output is exact as my expect. That prove the program is no problem. The problem is the operate system and compilers don't compatible very well.