so im not sure if theres an issue with my code but this same error keeps popping up about the .exe and i have no clue what to do. any help?
https://cboard.cprogramming.com/imag...AAAElFTkSuQmCC
so im not sure if theres an issue with my code but this same error keeps popping up about the .exe and i have no clue what to do. any help?
https://cboard.cprogramming.com/imag...AAAElFTkSuQmCC
Your link appears to be broken.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Last edited by Lu1408; 12-13-2019 at 12:52 AM.
Your original link contains 223702 characters. Either you are posting an image incorrectly or there is something wrong with image posting on the site. I notice that it was a "png" image, but the (totally unreadable) image you just posted is a jpg. Maybe there is something wrong with posting png images in particular.
Here's a test png image (Knossos silver coin, 400bc) :
Seems to work.
Anyway, it's kind of useless posting pictures of text. If I remember correctly, you can click on the popup box and press Ctrl-C to copy the text of the message.
A little inaccuracy saves tons of explanation. - H.H. Munro
it was a screenshot, i posted it again and it seems to work fine now
Okay. Whatever. Later.
A little inaccuracy saves tons of explanation. - H.H. Munro
I think you should post the text of the error message. As it stands, I cannot read the text shown in the image on my phone as it appears too blurred.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
okay well the error says "Unable to start program (directs to file)" however the last file is the .exe file which isnt in my debug folder. then below that it says "The system cannot find the file specified". last time i did a project the .exe file was made autmatically so im not sure why its not there now.
Probably because the build failed.. last time i did a project the .exe file was made autmatically so im not sure why its not there now.
Cut and paste the error messages from the IDE, the picture is pretty much unreadable.
If all else fails cut and paste the complete code, inside code tags in a post.
in my last post replying to someone i posted the error message by typing it out.Code:#include <iostream> using namespace std; const int g_kiSize = 3; char g_acBoard[g_kiSize][g_kiSize] = { { ' ', ' ', ' ' },{ ' ', ' ', ' ' },{ ' ', ' ', ' ' } }; void resetBoard(); bool setBoard(int iX, int iY, char cCharValue); void displayBoard(); void resetBoard() { for (int i = 0; i < g_kiSize; i++) { for (int j = 0; j < g_kiSize; j++) { g_acBoard[i][j] = ' '; } } } bool setBoard(int iX, int iY, char cCharValue) { if (g_acBoard[iX][iY] == ' ') { g_acBoard[iX][iY] = cCharValue; return true; } else { return false; } } void displayBoard() { cout << "+---+---+---+" << endl; for (int j = 0; j < g_kiSize; j++) { for (int i = 0; i < g_kiSize; i++) { cout << "| " << g_acBoard[i][j] << " "; } cout << "| " << endl; cout << "+---+---+---+" << endl; } }
I'm not talking about that error message. I'm talking about the compiler error messages in your IDE, not the "runtime" message.in my last post replying to someone i posted the error message by typing it out.
For example the code you supplied gives the following errors in my IDE:
Where is your main()? Every C++ program must contain a main() function.-------------- Build: Debug in c++homework (compiler: GNU GCC Compiler)---------------
g++ -Wall -fexceptions -g -c /home/jim/Working/c++homework/main.cpp -o obj/Debug/main.o
g++ -o bin/Debug/c++homework obj/Debug/main.o
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))