Code::Blocks Forums

User forums => Help => Topic started by: Elecfro on January 21, 2012, 10:54:56 pm

Title: problem with system("pause");
Post by: Elecfro on January 21, 2012, 10:54:56 pm
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
Title: Re: problem with system("pause");
Post by: Elecfro on January 21, 2012, 11:00:09 pm
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 ===|
Title: Re: problem with system("pause");
Post by: stahta01 on January 21, 2012, 11:29:50 pm
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 (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.
Title: Re: problem with system("pause");
Post by: Elecfro on January 21, 2012, 11:43:32 pm
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 ===|
Title: Re: problem with system("pause");
Post by: Elecfro on January 21, 2012, 11:44:57 pm
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
 
Title: Re: problem with system("pause");
Post by: oBFusCATed on January 22, 2012, 12:03:37 am
http://lmgtfy.com/?q=error%3A+%27system%27+was+not+declared+in+this+scope ?