Re: [Dev-C++] struct as function parameter
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Luigi S. <gi...@li...> - 2002-05-24 22:59:31
|
At 10:00 24/05/02 +0200, Stanislaw Stepien wrote:
>again
>
>program below doesnt work under devcpp 4.9.3
>
>#include <stdio.h>
>
>struct name {
> some structure data
>};
>
>void fun(struct name s)
>{
> printf("ok");
>}
>
>int main(void)
>{
> struct name s;
> fun(s);
> return 0;
>}
>
>it never prints "ok"
>
>
>regards, stan
I compiled the program above (note that I commented the line inside braces
in the struct's definition) and executed it from a DOS box: it prints "ok"
as expected.
However, if you run it from Dev-C++ (that is, using Ctrl+F10 or the "run"
icon) the string is displayed so fast, that you are unable to see it. I
suggest you use a DOS box or give a look at the FAQ for other solutions.
--
Luigi
gi...@li...
|