News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

problem with system("pause");

Started by Elecfro, January 21, 2012, 10:54:56 PM

Previous topic - Next topic

Elecfro

Hello CodeBlocks community, im new here and new to codeblocks.
I am getting an error when i try using system("pause");
can someone please tell me what i am doing wrong. Thanks

Elecfro

also, this is the error message
C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp||In function 'int main()':|
C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp|7|error: 'system' was not declared in this scope|
||=== Build finished: 1 errors, 0 warnings ===|

stahta01

This is NOT a programming help site.

But, turn on full Compiler logging and maybe I will see a problem when you post the build log.
NOTE: Do a re-build to make sure the project builds from the beginning.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Note: It is likely you just forgot to include the right header in your source code.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

Elecfro

sorry i thought i could get help but here is the build log:
||=== Practice, Debug ===|
C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp||In function 'int main()':|
C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp|7|error: 'system' was not declared in this scope|
C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp|9|error: expected ';' before '}' token|
||=== Build finished: 2 errors, 0 warnings ===|

Elecfro

sorry that is the build message, here is the log:
-------------- Build: Debug in Practice ---------------

mingw32-g++.exe -Wall  -g     -c "C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp" -o obj\Debug\Untitled1.o
C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp: In function 'int main()':
C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp:7: error: 'system' was not declared in this scope
C:\Documents and Settings\adm\My Documents\C++\Practice\Untitled1.cpp:9: error: expected ';' before '}' token
Process terminated with status 1 (0 minutes, 1 seconds)
2 errors, 0 warnings


oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]