Re: [Dev-C++] getting unexpected results
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2003-07-30 09:20:41
|
what are the error messages?
Is struct str_misc declared in stdlib ?
>From: dawood <da...@ku...>
>To: Dev C++ <dev...@li...>
>Subject: [Dev-C++] getting unexpected results
>Date: Tue, 22 Jul 2003 19:50:51 +0800
>
>Can anybody let me know, why the below code is not working correctly.
>
>#include <iostream.h>
>#include <stdlib.h>
>
>int main()
>{
> struct str_misc {
> char* cstr;
> };
> str_misc str_ex[12];
> char* buf;
>
> cin>>buf;
> str_ex[0].cstr= buf;
> cout<<str_ex[0].cstr<<"index=0"<<'\n';
>
> cin>>buf;
> str_ex[1].cstr= buf;
> cout<<str_ex[1].cstr<<"index=1"<<'\n';
>
> cout<<str_ex[0].cstr<<" repeat index=0"<<'\n';
> cout<<str_ex[1].cstr<<" repeat index=1"<<'\n';
>
> system("PAUSE");
> return 0;
>}
>
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Free pre-built ASP.NET sites including
>Data Reports, E-commerce, Portals, and Forums are available now.
>Download today and enter to win an XBOX or Visual Studio .NET.
>http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Use MSN Messenger to send music and pics to your friends
http://www.msn.co.uk/messenger
|