Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


Brand New to C++, Easy Answer I Assume

  • Brian Donnelly
    Brian Donnelly

    I'm just learning C, I've got Sam's learn C in 21 days, gonna do C++ after that.
    I'm using DEV C++ to compile code. When I use the cmd in my run prompt on Windows 7 and then use the cd command to go to my documents and run my compiled programs (none that I really wrote, mostly just following the book to understand the code) I'm getting an error message:
    "filename" is not recognized as an internal or external command, operable program or batch file.
    When I compile these simple programs and run them from DEV C++ the program closes when its done with its process and I can't see if the program works or not. I found a simple code:

    include <stdlib.h>

    int main()
    return 0;

    But I get all kinds of error messages when I try to compile with this because I don't know exactly how to 'inject' it into the program. I tried just putting it at the end but I get all kinds of errors and I really don't know where I should be putting it.

    I hope someone can help, I really want to learn how to program.
    Thanks for your time.