I've been messing around on Netbeans and have come to a standstill with one of my programs. I don't get any red lines or obvious warnings, yet my .exe isn't turning up. The following is the text that I get which I can't really understand. Hopefully one of you guys can translate this and maybe tell me where the problem hides :)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/James/Documents/Programming/Numbers'
"/C/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/numbers.exe
make.exe[2]: Entering directory `/c/Users/James/Documents/Programming/Numbers'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/Find Number in Pi.o.d
g++ -c -g -MMD -MP -MF build/Debug/MinGW-Windows/Find Number in Pi.o.d -o build/Debug/MinGW-Windows/Find\ Number\ in\ Pi.o Find\ Number\ in\ Pi.cpp
g++.exe: error: Number: No such file or directory
g++.exe: error: in: No such file or directory
g++.exe: error: Pi.o.d: No such file or directory
make.exe[2]: *** [build/Debug/MinGW-Windows/Find Number in Pi.o] Error 1
make.exe[2]: Leaving directory `/c/Users/James/Documents/Programming/Numbers'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/James/Documents/Programming/Numbers'
make.exe": *** [.build-impl] Error 2
I hope I don't get anything wrong here, but I don't think I've ever included a header file. I haven't (or at least not knowingly) included one in my previous programs. Perhaps if I include the code here it might become obvious where I've gone wrong.
#include <iostream>
using namespace std;
int main()
{
char Pi[] = "314159265358979323846264338327950288419716939937510582";
char digit;
cout << "Enter a digit and I'll find the first time it appears in Pi" << endl;
cin >> digit;
bool found = false;
int count = 0;
while (found = false)
{
if (Pi[count] = digit)
{
found = true;
count++;
}
else
{
count++;
}
}
cout << "The number " << digit << " was found at position " << count << endl;
cin >> digit;
return 0;
}
You might even see problems with the functionality of the program too, sorry about that :P
Did you remember to create a new project when you started writing this one? Or did you just try to change the build directories from your last one? Usually when the object file is 'Pi.o' the resulting executable will be 'Pi.exe' not 'numbers.exe'.
That was the problem thanks a bunch for your patience :) It's true I changed the code in the project, which caused this to happen. Once again thanks a lot. Now I need to start a new topic to find out why the input number is always found at position 0 xD