Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1505
  • Last Modified:

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

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
ssharp77
Asked:
ssharp77
  • 2
2 Solutions
 
Infinity08Commented:
For using the system function, you need to #include <stdlib.h>
0
 
Infinity08Commented:
Or in case it's C++ :

    #include <cstdlib>
0
 
ssharp77Author Commented:
That's what I forgot to do. The ever basic #include . Ugh. Thanks as always Infinity!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now