Results 1 to 3 of 3

Thread: C++ for the heck of it

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default C++ for the heck of it

    if you have no idea what C++ i'd suggest you ignore this completely.

    Code:
    MyString.substr((MyDouble>0)?(log10(MyDouble)>0?MyInt+1:2):(log10(fabs(MyDouble))>0?ceil(log10(fabs(MyDouble)))+2:3),MyString.length());
    I'm just going to use this thread to keep this bit of code and to inspire and horrify.

    Given MyString being a converted double called MyDouble, this substring will get what is after the decimal point. Unless the number is exactly 0. In which case, wtf are you doing?



    *disclaimer* yeah i know just use string manipulation, this is meant to be unnecessarily complex and/or arduous

    so for the love of god, if you're writing in C++, NEVER use this

    also, this is going in general discussion because there isn't a forum for vauge or general coding (not that there's a need for one, either)
    A programming genius called HEAP
    Had trouble in getting to sleep
    So he made his lambs troup
    through a huge FOR-NEXT loop
    FOR 1 TO 10000: NEXT sheep.

  2. Default

    Can you code me an a good Anti-Cheat for CS comparable to ESEA's?

    kthx


    4) Use admin privileges sparingly and appropriately.


  3. #3

    Default

    Quote Originally Posted by Sin View Post
    Can you code me an a good Anti-Cheat for CS comparable to ESEA's?
    I could drop a hammer on my keyboard and end up with code for a better anti-cheat XD
    A programming genius called HEAP
    Had trouble in getting to sleep
    So he made his lambs troup
    through a huge FOR-NEXT loop
    FOR 1 TO 10000: NEXT sheep.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •