Scott Meyers' Effective STL :: C++

This is a discussion on Scott Meyers' Effective STL :: C++ within the C++ Programming forums, part of the General Programming Boards category; Hi. I am studying more advanced C++ via Scott Meyer's Effective STL. I have not read any of his previous ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348

    Scott Meyers' Effective STL :: C++

    Hi.

    I am studying more advanced C++ via Scott Meyer's Effective STL. I have not read any of his previous books including the C++ series. He does an exceptional job introducing invaluable advices on the use of STL. I am still reading it.

    He makes references to a term that I am not familiar with. He mentions "reference counting" about vector and string containers. What is it?

    Thanks,
    Kuphryn

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Posts
    5,451
    The concept of the reference count is simply to share chunks of data between objects by keeping a count of how many are using it. When no more objects refer to that memory, the chunk is released.
    Code:
    int main(void){srand(time(0));for(double l=rand(),l0=0,l00=0;;l0+=0.1){for(double l000=0;l000
    <1;l000+=.001,l+=((double)rand()/RAND_MAX)/0x64,l00+=((sin(l*0x8*atan(l0)*l000-(l0*0x8*atan
    (l)))*0.5)+0.5)){l00-=floor(l00);for(size_t l0000=0,l00000=(size_t)(0x50*(l00));l0000<l00000;++l0000
    )putchar(0x20);putchar(0x61+(int)((double)rand()/RAND_MAX*0x1a));putchar('\n');}}return 0;}

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Okay. Thanks.

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why Scott Meyers wants you to slap yourself?
    By meili100 in forum C++ Programming
    Replies: 5
    Last Post: 10-23-2008, 11:38 PM
  2. C Formatting Using STL
    By ChadJohnson in forum C++ Programming
    Replies: 4
    Last Post: 11-18-2004, 04:52 PM
  3. im extreamly new help
    By rigo305 in forum C++ Programming
    Replies: 27
    Last Post: 04-23-2004, 11:22 PM
  4. Prime Number Generator... Help !?!!
    By Halo in forum C++ Programming
    Replies: 9
    Last Post: 10-20-2003, 07:26 PM
  5. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21