is there any c++ compiler for ipad2? I am a student in college and just started to learn C++. I have an iPad 2 and no computer (it broke and I will not buy another one). So I want to find an app that seems like codeblock for Windows. The ability to run code and maybe can fix it is a big plus. Thanks a lot!
No fully functional IDE exists on iOS to make runnable apps without jailbreaking  but you can sign up for a free Amazon Web service account and get an ssh client and program "on the iPad" assuming you have a network account.

An app like nimbus or textastic would be an ideal companion once you were clear how compiling elsewhere fit your desire to learn.

Xcode is currently only available for Mac OS X to develop programs that run iOS and cocoa touch (not which is very much not C++ - even though Xcode can be used for C++).

Have a look at this question on learning C which will apply almost entirely to C++ on iOS.

Is there a C compiler for iPad?