Solved

Bloodshed Dev-C++ Error with system("pause")

Posted on 2009-04-05
3
1,257 Views
Last Modified: 2012-05-06
Until recently, I have been able to use the system("pause"); command without any issue. Now when using it, it returns an error indicating that it is the first time I am using it and it has not been declared. Can someone help me figure out why I am getting this error now?

In function `int main()':
44 `system' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
0
Comment
Question by:ssharp77
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Infinity08 earned 500 total points
ID: 24072587
For using the system function, you need to #include <stdlib.h>
0
 
LVL 53

Assisted Solution

by:Infinity08
Infinity08 earned 500 total points
ID: 24072588
Or in case it's C++ :

    #include <cstdlib>
0
 

Author Closing Comment

by:ssharp77
ID: 31566805
That's what I forgot to do. The ever basic #include . Ugh. Thanks as always Infinity!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now