experience from my domain registration catch program

Yesterday, I got a sudden though: if some domains like www.rpg.com are so valuable, why don’t I write a program to catch domains information automatically?
 
So I started.
 
I spent one afternoon on how it structured. With OOP thinking, I have no problem at all.
 
then I spent one night to fulfill my program with VC and actually with only standard c++.
 
dozens of problems comes out:
 
the c++ string is basic on a char class of C. I don’t know C char class well, at all.
 
the system (" ") function needs a parameter of *char type, I don’t understand what is a pointer, and how it works in these funtions at all.
 
So my program failed, basically with the problem of the pointer type for the system("") function.
 
what I plan to do next, is to figure out what is pointer and the C string class, how it works, then come back to finish the program.
 
today’s updated:
 
I got the correct answer from csdn.net:
 
system ( ( string("whois ") + result.c_str() + string(" >>temp.txt") ).c_str() );
 
this line excutes " whois www.ebecn.com >>temp.txt" on dos.
 
string ("whois ") : string-ize the "whois ".
.c_str(): put the object from c++ string to C string. for functional use i guess.
( ).c_str(): as above, support "+" operators ( and probably some more others).
 
alright, my domain catcher gonna be out in a few days. =.= Y~~
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: