Click here to Skip to main content
15,895,784 members
Please Sign up or sign in to vote.
1.06/5 (3 votes)
See more:
i'm a newbie in IT and i use C-Free 5.0;I wrote this code and it show "[error] g++.exe ... no such file or directory".
-----
C++
#include <stdio.h>
#include <conio.h>
void main()
{
    int n,i;
    long s;
    scanf ("%d" ,&n);
    s=0;
    i=1;
    while (i<=n)
    {
        s=s+i;
        i=i+1;
    }
    printf("%ld",s);
}
Posted
Updated 13-Oct-15 7:45am
v2
Comments
W Balboos, GHB 13-Oct-15 11:39am    
If this is your first attempt at using the compiler installation, I'd check to make sure it is correctly installed, including checking your system's PATH's.
Afzaal Ahmad Zeeshan 13-Oct-15 12:16pm    
There is no "g++.exe" file being used here, otherwise, if it complained about stdio or conio files. Then please check the libraries for your C environment.

" No file or such directory"error mostly comes when there is an error in header file.But when seeing your question I came to know that your code does not suffer from the error.
The error may be associated with your compiler.You may not installed it correctly.Try reinstalling your program.Or you can try downloading MinGW compiler(common compiler used by free IDE's) from www.equation.com according to your specifications (32 or 64 bit) or try using others like codeblocks, Bloodshed Dev C++
etc., etc.,
 
Share this answer
 
v2
It means you do not have the GNU C/C++ compiler installed on your system.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900