|
From: Linda H. <lz...@sp...> - 2001-03-28 04:26:06
|
Try int main () and a couple of cin.get(); before the return 0.
Linda
---------------------------------
----- Original Message -----
From: "Randy Hust" <ran...@rc...>
To: <dev...@li...>
Sent: Tuesday, March 27, 2001 10:25 AM
Subject: [Dev-C++] Newbie
>
> Hi..I'm just getting started and I understand that when you want to halt
> the screen in order to read the result in DOS you must enter
> system("PAUSE");
> Why does this work sometimes and other times I get a compilation error
> " 18: implicit declaration of function `int system(...)' "
>
> Here is a sample no-brainer program I coded that produces just that
> error...
> Thanks!
>
> #include <stdio.h>
>
> main()
> {
> float perCent,result,num;
>
> printf("Enter the number you want a percentage of :\n");
> scanf("%f",&num);
>
> printf("Enter the percentage of that number you want calculated :\n");
> scanf("%f", &perCent);
>
> result = (num * perCent)/100;
>
> printf("%f percent of %f = %f", perCent,num,result);
>
> system("PAUSE");
>
> return 0;
>
> }
>
>
>
> _______________________________________________
> Dev-cpp-users mailing list
> Dev...@li...
> http://lists.sourceforge.net/lists/listinfo/dev-cpp-users
|