I want to learn c++ and downloaded a gcc compiler. but the compiler isnt functioning. when i click on the application window, a black screen just flashes with the text:"c++.exe:no input files" What could be wrong?what do I do about it?

You need to tell the compiler what to do by specifying files/options on the command line. Clicking on the compiler executable will not do much as you've already noticed.

Perhaps read a basic tutorial, I'd suggest you to go through sections;
0.4 Introduction to development
0.5 Installing an Integrated Development Environment (IDE)
0.6 Compiling your first program

Oh, and the documentation for GCC can be found here

hey thanks a lot!I managed to write a few programs using code::blocks but I still didnt get how to do it without using an IDE.:(

hey thanks a lot!I managed to write a few programs using code::blocks but I still didnt get how to do it without using an IDE.:(

The simplest example to compile C++ code would be:

g++ helloworld.cpp -o helloworld.exe

Since you are taking the very first steps, perhaps you'd be better off sticking with the IDE, letting it handle the compiler/linker options and such. There are quite a few of them, see the GCC documentation (link above).

Also make sure the compiler is in the path of whatever cmd console you are using. Under windows (I assume, since you have C++.exe) type "PATH = %PATH%;C:\MinGW\bin" (change the values for your system) which tacks that directory on to the existing path

This article has been dead for over six months. Start a new discussion instead.