PDA

View Full Version : C++ for the heck of it



kionay
04-03-2014, 08:53 AM
if you have no idea what C++ i'd suggest you ignore this completely.


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)

Sin
04-03-2014, 08:59 AM
Can you code me an a good Anti-Cheat for CS comparable to ESEA's?

kthx

kionay
04-03-2014, 09:49 AM
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