View Single Post
Uh, it looks like you're trying to code Java in C++.

Correct code: cpp.sh/32yf

Raw:

c++



Here is an image of the memory leak you made too:
http://gyazo.com/2e98773dad7a8eb975a62f4c8b30ac03

Its just a matter of learning how c++ does things differently.

By the way, you should try getting an IDE like Eclipse or something. If you want just a text editor, try Kate - you'll have to manually compile with g++ from the terminal though :^)
Last edited by Fear; May 31, 2015 at 09:09 PM.