Tuesday, May 14, 2013

Sunday, March 31, 2013

Lambda Expression Only Available With -std=c++0x or -std=gnu++0x

So here is the story in short:

I was revising my C++ programming based on a book that I borrowed from a library titled, "Sams Teach Yourself C++ in One Hour a Day", written by Siddhartha Rao. The book is good. Its pact with tons of examples. But its proofreading is not so good. So, if your programming is not bad, you should be able to spot the mistakes when you read through. The downside to this book is that it does not mention the solution that we have to configure if certain examples does not work. for example, it makes quite a difference to,


#include <string> or its variant of .h</string>The extra blogger codes drives me crazy. I do not know about other books. To be honest, I never read other programming books in detail before. So, I don't know. But overall, I like the book.

Ok, I think I have drifted away. Let's get back on the track. So, today, while I am trying out the lambda function, I came across this error, "Lambda Expression Only Available With -std=c++0x or -std=gnu++0x".
I googled for quite sometime. Most of the answers are for those who are familiar with their IDE. They keep on saying add the command line to your compiler. I looked at my compiler setting, I scratched my head.

After searching and thinking for awhile. I opened up my compiler setting again for the second time. This time, I read carefully, then I saw something and I ticked it as shown below:

Binggo! That's it! It worked! Now, the codes can be compiled.

Hope that you enjoyed this post. It is not meant for those who are familiar with their IDEs. The last time I used codeblocks was in 2009. ;)

Tuesday, November 13, 2012

How To Keep it FIT The Lazy Way

Well, its as the title mentioned, how to keep it fit the lazy way?

Why do I say, "lazy way"?

Well, you guess?

That is because I am very very very very lazy person. Trust me. I am anti-gym by the way. If possible, I only want to practice one type of workout that enhances all the muscles. But yeah no such thing I guess.

So, here is how to keep fit the lazy way:

  • 5 Minutes London Bridge - Do a few variations of planks, 15 seconds each till you reach 5 minutes. Do it everyday!
  • Pull ups - Do pull up everyday. I don't care how many do you want to do. But at least, once a week, you have to do 10 sets of pull ups in one day. You are free to do any kind of variations. Be creative and excite all your muscles. 
  • Push ups - This one you have to do concurrently with pull ups. For me, I will do 5 sets of 16-20 push ups concurrently with the last 5 sets of 8-10 pull ups. It depends on your ability too. Do as much as you can, but don't force yourself. If you can't complete it, there is always next time. Don't overdo it till you collapse or what. that is just plain stupi*.
  • RUN - This is important. RUN at least once a week. If you are fat, run for 30 minutes for each session. For me, I run at least twice a week, about 5 Km each. Its really a pain in the as*. But hey, I want my wife to look sexy and slim for only me. So, I guess, I have to do some favour for her first? 
Be consistent and never give up! Love every pain and muscle aches. Trust me, I love them. Oh and I get extremely motivated to workout more whenever I watch fighting and ninja movies.

See ya!

How To Strengthen Your Weak Arm Naturally

Yeah, you heard it?

How to increase it strength to be in par with your strong arm naturally, without going to the gym and lifting weights?

Its easy. Do a one hand push up and use only your weak arm. Do not use your strong arm to do a one hand push up. Remember, your objective is to strengthen your weak arm to be as strong as your strong arm. You will have to burst your weak arm fast. If you use your strong hand in the process, well, your weak arm will need more time to catch up with your strong arm. (Currently I am at this stage)

Here is how to do it at http://www.beastskills.com/one-arm-pushup/

What's next?

Once you got use to one hand push up, do a one hand pull up using your weak arm. Good luck!