Love this site? Hate it? Leave us some comments.
*/
*/

View \#3_VER4.C

Some Introductory C++ Code Examples

Submitted By: WEBMASTER
Rating: starhalf star (Rate It)


#line 1 "#3_ver4.cxx"
void *_new(long);
void _delete(void*);
void *_vec_new(void*,int,int,void*(*)(void*));
void _vec_delete(void*,int,int,void(*)(void*,int),...);
void exit(int);
static void cdecl _STI();
static void cdecl _STD();

struct Wsp { char _dummy; } ;
extern char *oct (long , int );
extern char *dec (long , int );
extern char *hex (long , int );

extern char *chr (int , int );
extern char *str (char *, int );
extern char *form (char *, ... );
struct ostream {
void *_ostream_bp ;
short _ostream_state ;} ;
struct ostream *_ostream__lshiftNFNPC__ (struct ostream* , char *);
struct ostream *_ostream__lshiftNFUL__ (struct ostream* , unsigned long );
struct ostream *_ostream__lshiftNFL__ (struct ostream* , long );
struct ostream *_ostream__lshiftNFD__ (struct ostream* , double );
struct ostream *_ostream__lshiftNFNRCWsp___ (struct ostream* , struct Wsp *);
struct ostream *_ostream_put (struct ostream* , char );
struct istream {
void *_istream_bp ;
struct ostream *_istream_tied_to ;
char _istream_skipws ;
short _istream_state ;} ;
struct istream *_istream__rshiftNFNPC__ (struct istream* , char *);
struct istream *_istream__rshiftNFNRC__ (struct istream* , char *);
struct istream *_istream__rshiftNFNRS__ (struct istream* , short *);
struct istream *_istream__rshiftNFNRI__ (struct istream* , int *);
struct istream *_istream__rshiftNFNRL__ (struct istream* , long *);
struct istream *_istream__rshiftNFNRF__ (struct istream* , float *);
struct istream *_istream__rshiftNFNRD__ (struct istream* , double *);
struct istream *_istream__rshiftNFNRCWsp___ (struct istream* , struct Wsp *);
struct istream *_istream_getNFNPC_I_I__ (struct istream* , char *, int , char );
struct istream *_istream_putback (struct istream* , char );
extern void eatwhite (struct istream *);
extern struct istream cin ;
extern struct ostream cout ;
extern struct ostream cerr ;

extern struct Wsp WS ;


struct complex {
double _complex_re ;double _complex_im ;} ;
void pascal _complex__asplus (struct complex* , struct complex );
extern int _eqNFCcomplex__Ccomplex___ (struct complex , struct complex );
extern struct complex _mulNFCcomplex__Ccomplex___ (struct complex , struct complex );
extern struct complex _plusNFCcomplex__Ccomplex___ (struct complex , struct complex );


static struct complex _plusNFCcomplex__Ccomplex___ (struct complex , struct complex );
int main ()
{
  {
        struct complex _au1_num1 ;
        struct complex _au1_num2 ;
        struct complex _au1_num3 ;
        struct complex _au1_num4 ;
        struct complex _au1_num5 ;
        struct complex _au1_num6 ;
        struct complex _au1_num7 ;
        struct complex _au1_num8 ;
        double _au1_x ;
        double _au1_y ;
        double _au1_z ;
        struct complex _au0__Xa__plusNFCcomplex__Ccomplex____global ;
        struct complex _au0__Xb__plusNFCcomplex__Ccomplex____global ;
        struct complex _au0__X_V1__plusNFCcomplex__Ccomplex____global ;
        struct complex _au0__Xa__asplus_complex ;

        ( ( ( (((struct complex *)(& _au1_num1 ))-> _complex_re
        = ((double )1 )), (((struct complex *)(& _au1_num1 ))-> _complex_im
        = ((double )0 ))) , ((((struct complex *)(& _au1_num1 ))))) ) ;
       
        ( ( ( ((& _au1_num2 )-> _complex_re = 1. ),
        ((& _au1_num2 )-> _complex_im = 1. )) , (((& _au1_num2 )))) ) ;
       
        ( ( ( ((& _au1_num3 )-> _complex_re = 3. ),
        ((& _au1_num3 )-> _complex_im = 8. )) , (((& _au1_num3 )))) ) ;
       
        ( ( ( ((& _au1_num4 )-> _complex_re = 1. ),
        ((& _au1_num4 )-> _complex_im = 1. )) , (((& _au1_num4 )))) ) ;
       
        ( ( ( ((& _au1_num5 )-> _complex_re = ((double )( 5 ) )),
        ((& _au1_num5 )-> _complex_im = 1. )) , (((& _au1_num5 )))) ) ;
       
        ( ( ( ((& _au1_num6 )-> _complex_re = ((double )( ( ( ( 6 ) , 7 ) , 8 ) , 9 ) )),
        ((& _au1_num6 )-> _complex_im = 1. )) , (((& _au1_num6 )))) ) ;
       
        ( ( ( ((& _au1_num7 )-> _complex_re = ((double )5 )),
        ((& _au1_num7 )-> _complex_im = ((double )5 ))) , (((& _au1_num7 )))) ) ;
       
        _au1_num8 = ( _au1_num1 ) ;
       
        _au1_x = 1. ;_au1_y = 5. ;_au1_z = 3. ;

   {
        struct complex _au0__V3 ;
        struct complex _au0__V4 ;

        ( (_au0__Xa__asplus_complex = _plusNFCcomplex__Ccomplex___ (
     ( (_au0__Xa__plusNFCcomplex__Ccomplex____global =
           (( ((_au1_num1 . _complex_re == _au1_num2 . _complex_re )
           && (_au1_num1 . _complex_im == _au1_num2 . _complex_im ))) ?
           _au1_num3 : _au1_num1 )),
           ( (_au0__Xb__plusNFCcomplex__Ccomplex____global =
           ( ( ( ( ((& _au0__V3 )-> _complex_re =
           (_au1_x * _au1_y )), ((& _au0__V3 )-> _complex_im = 1. )) ,
           (((& _au0__V3 )))) ) , _au0__V3 ) ),
           (((((((& _au0__X_V1__plusNFCcomplex__Ccomplex____global )->_complex_re =
           (_au0__Xa__plusNFCcomplex__Ccomplex____global . _complex_re
           + _au0__Xb__plusNFCcomplex__Ccomplex____global . _complex_re )),
           ((& _au0__X_V1__plusNFCcomplex__Ccomplex____global )-> _complex_im
           = (_au0__Xa__plusNFCcomplex__Ccomplex____global . _complex_im
           + _au0__Xb__plusNFCcomplex__Ccomplex____global . _complex_im ))) ,
           (((& _au0__X_V1__plusNFCcomplex__Ccomplex____global )))) ) ,
           _au0__X_V1__plusNFCcomplex__Ccomplex____global ) ) ) ) ,
           ( ( ( ( ((& _au0__V4 )-> _complex_re = (1. / _au1_z )),
           ((& _au0__V4 )-> _complex_im = 1. )) , (((& _au0__V4 )))) ) ,
           _au0__V4 ) ) ), ( ((& _au1_num4 )-> _complex_re
           += _au0__Xa__asplus_complex . _complex_re ),
           ((& _au1_num4 )-> _complex_im
           += _au0__Xa__asplus_complex . _complex_im )) ) ;
       
        ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num4 )-> _complex_re , (& _au1_num4 )-> _complex_im ) ) ) ;
        ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num5 )-> _complex_re , (& _au1_num5 )-> _complex_im ) ) ) ;
        ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num6 )-> _complex_re , (& _au1_num6 )-> _complex_im ) ) ) ;
        ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num7 )-> _complex_re , (& _au1_num7 )-> _complex_im ) ) ) ;
        ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num8 )-> _complex_re , (& _au1_num8 )-> _complex_im ) ) ) ;
   }
  }
  exit ( 0 );
}


static struct complex _plusNFCcomplex__Ccomplex___
          (struct complex _au0_a , struct complex _au0_b )     
{
        struct complex _au0__X_V1__plusNFCcomplex__Ccomplex____global ;
        {
                return ( ( ( ( ((& _au0__X_V1__plusNFCcomplex__Ccomplex____global )->
                _complex_re = (_au0_a . _complex_re + _au0_b . _complex_re )),
                ((& _au0__X_V1__plusNFCcomplex__Ccomplex____global )-> _complex_im =
                (_au0_a . _complex_im + _au0_b . _complex_im ))) ,
                (((& _au0__X_V1__plusNFCcomplex__Ccomplex____global )))) ) ,
                _au0__X_V1__plusNFCcomplex__Ccomplex____global ) ;
        }
}

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.
Resource Listings