posted by
pmsumner at 02:06am on 22/04/2002
Admittedly I spent a lot of that browsing the MSDN site looking for info on what half the classes and inbuilt functions did, but boy it's not simple. Stuff that you're doing in 3 lines in Perl takes 10 in C++. Simple stuff like splitting a chunk of text into seperate lines. In Perl:
@lines = split /[\n\r]/, $retval; # Take $retval and split it at each line break, putting result into array
In C++
while ((newloc = response.Find((TCHAR) '\n', loc)) != -1) {
// Traverse "response" and look for a newline symbol
CString frag = response.Mid(loc, newloc-loc);
// Copy the string between the start and the end points into "fragment"
loc = newloc+1;
// Increase position by one
}
One line to three, and that's a simple example. Networking code is just foul. Even using the CInternetSession:: classes, it's nowhere near as easy as Perl and it's HTTP:: / LWP:: libraries. Might be more powerful when used properly, but still... I think I need a reference book!
(no subject)
(no subject)
Me whinging about my parents and money, mixed with geekery. And it's not like I didn't warn y'all about the geekery there!
And anyhow, I'm talking about my life... unfortunately until some agency deigns to actually bother writing back to me when I ask about jobs, thus it shall stay...
(no subject)
(no subject)
I need sleep but am too proud to go to bed :)