Well i started learning c++, writing my first hello world and console doesn't even appear.
#include <iostream>
int main()
{
std::cout << "Hello, World!" << std::endl;
return 0;
}
And i get this in build log:
Checking for existence: C:\Users\Salient\Desktop\Pamokos\Pirmas chapteris\bin\Debug\Pirmas chapteris.exe
Executing: "C:\Users\Salient\Desktop\Pamokos\Pirmas chapteris\bin\Debug\Pirmas chapteris.exe" (in C:\Users\Salient\Desktop\Pamokos\Pirmas chapteris\.)
Process terminated with status 0 (0 minutes, 0 seconds)
Do you use 'Build' or 'Build and run' option?
Maybe console just has been closed.
Try to build and run this code:
#include <iostream>
int main() {
std::cout << "Hello, world" << std::endl;
int n;
std::cin >> n;
return 0;
}
I use build and run. And how much time should i wait for program to run? Since only this happen's
Checking for existence: C:\Users\Salient\Desktop\Pamokos\Pirmas chapteris\bin\Debug\Pirmas chapteris.exe
Executing: "C:\Users\Salient\Desktop\Pamokos\Pirmas chapteris\bin\Debug\Pirmas chapteris.exe" (in C:\Users\Salient\Desktop\Pamokos\Pirmas chapteris\.)
i waited for about 2 minutes but nothing happens. Oh and in task mananger process tab i can see pirmas chapteris.exe is running but i can't see the console.
What could be wrong with this code? It doesn't even have a loop.
#include <iostream>
int main() {
std::cout << "Hello, world" << std::endl;
int n;
std::cin >> n;
return 0;
}
I'm having this same problem. I'm just following "C++ All In One For Dummies (2nd edition)" (because I'm a beginner, haha).
I'm using Code::Blocks 8.02 and the book told me to put this code in:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello, I am your computer talking." << endl;
return 0;
}
I did this, then clicked Build->Build and it came up with this message.
"Process terminated with status 0 (0 minutes, 0 seconds)"
"0 errors, 0 warnings"
So I'm wondering why it would say there are no errors but still gives me the "terminated with status 0"? I went and ran it and it seemed to work, but its execution time was 0.062 s instead of 0.015 s (which I'm worried that if I'm writing bigger programs, they will compile slower with this problem?)...it's just strange that that would happen...
Turn on Full Compiler Logging and do a Full Rebuild and possible you have a compiler error that will show up in the build log.
See MortenMacFly Signature for Compiler logging.
Or, Wiki FAQ http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
Tim S.
I ask for the last time; if you do NOT post the "build log", then do NOT expect any help from me!
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
Tim S.
-------------- Build: Debug in SayHello ---------------
mingw32-g++.exe -Wall -fexceptions -g -c C:\CPP_Projects\SayHello\main.cpp -o obj\Debug\main.o
mingw32-g++.exe -o bin\Debug\SayHello.exe obj\Debug\main.o
Output size is 57.26 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings
...is this what you wanted?