I am running notepad++ through wine. But I am not able to compile a program(specially c++).
Is there any compiler that I could use? What should I do?
Notepad++ is not a compiler and does not contain a compiler. You must install a separate compiler, then configure Notepad++ to use it.
The NppExec plugin (docs) can be made to do this. (I've never done it, so I cannot verify that the following currently works.) This answer over on stackoverflow gives detailed instructions to use NppExec to save the current document, and then run it through a perl interpreter. The (currently) other answer here gives an example of passing the source through the g++ compiler (for C++).
Just to be clear: There is no compiler bundled with Notepad++. You must install another package to have a compiler. Once you have done so, you can adapt the above to cause Notepad++ to save your source, invoke the compiler on the source, run the resulting executable (which you might eventually want to make condition on a successful build), and show you its console output.
If you would prefer a complete IDE (instead of a very fancy editor that can be made into an IDE), see this other question and its several answers. Note that these also require installation of a compiler (as a separate package). Some of these include this requirement via package dependencies, but generally do not -- you will still have to install a compiler. I might go with the invocation
sudo apt-get install build-essential
since this will include g++, gcc, libc*-dev, and make. (Package build-essential is intended for building Debian packages, but includes a bare minimum C++ build chain.)