You need to partition your application into 2 pieces: 1) a web front end and 2) business logic. The business logic would be your C++ code. You really don't want to implement your web front end in C++ unless you have a lot of spare time and patience. Luckily there are a lot of web frameworks to choose from which are based on more modern languages. My favorite is the new ASP.NET MVC framework because I'm a Windows/.NET guy, but you can take your pick (ruby on rails, python, java, etc).
RESTful design requires that you organize your application's functionality as resources and CRUD operations on those resources. CRUD operations map to the HTTP POST, GET, PUT and DELETE methods. A great book on RESTful design is RESTful Web Services... note I haven't found a whole lot of books on this topic.
Once you design and implement your REST API in the web front end, there are various ways to connect it to your C++ app, some of which were mentioned by previous posters (e.g. FastCGI).
P.S. You mentioned something about your app being stateful. If you need to have state that that persists across multiple HTTP requests, there are some RESTful design principles you can apply. Check out the book or search the web (sorry I don't have my favorite links handy right now).