pmsumner: (Default)
Add MemoryShare This Entry
posted by [personal profile] pmsumner at 02:06am on 22/04/2002

And my head hurts.

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!

There are 4 comments on this entry. (Reply.)
 
posted by [identity profile] jav.livejournal.com at 06:11pm on 21/04/2002
when are you going to go back to posting stuff us normal people will understand? ;-)
 
posted by [identity profile] phil99.livejournal.com at 06:26pm on 21/04/2002
Hey, I'm posting a mix! :-)

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...
 
posted by [identity profile] jav.livejournal.com at 06:27pm on 21/04/2002
i was teasing you - i support you and i'm proud of you! I just skim the geekery because, even though I am a self-proclaimed geek, I dont get it.. ;-)
 
posted by [identity profile] phil99.livejournal.com at 06:31pm on 21/04/2002
*smiles* Sorry, I'm not too hot on reading sarcasm/whatever into writing at this time of day. *big apologetic hugs*

I need sleep but am too proud to go to bed :)

May

SunMonTueWedThuFriSat
      1
 
2
 
3
 
4
5
 
6
 
7
 
8
 
9
 
10
 
11
 
12
 
13
 
14
 
15
 
16
 
17
 
18
 
19
 
20
 
21
 
22
 
23
 
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31