I want to create a web application that runs with very little RAM and I think C++ can help me achieve that.
Now, many people say C++ is unsuited for web development
Have you looked at http://www.tntnet.org/. They have created a... well let me cut and paste from their website:
Tntnet is a modular, multithreaded, high performance webapplicationserver for C++. To create webapplications Tntnet has a template-language called ecpp similar to php, jsp or mason, where you can embed c++-code inside a html-page to generate active content. The ecpp-files are precompiled to c++-classes called components and compiled and linked into a shared library. This process is done at compiletime.
I've used it and it has quite a small overhead plus it has screamingly fast dynamic page generation. Makes PHP, Ruby etc snails in comparison because with tntnet you are running compiled C/C++ code.