vc++ 5.0 to vc++ 6.0 problem 
Author Message
 vc++ 5.0 to vc++ 6.0 problem

The following code crashes with a access violation in vc++ 6.0, but
works fine in vc++5.0:

char bitoff (char& c, char i) { return c &= ~(1 << i; }

I would appreciate any suggestions.



Sat, 15 Sep 2001 03:00:00 GMT  
 vc++ 5.0 to vc++ 6.0 problem

Quote:

>The following code crashes with a access violation in vc++ 6.0, but
>works fine in vc++5.0:

>char bitoff (char& c, char i) { return c &= ~(1 << i; }

>I would appreciate any suggestions.

Syntax error:  Missing ")" - return statement

------------------------------------------------------------------------
Andy Yee                   Corporate E-Mail:    See Above
Software Engineer          Coporate Web Page:   http://www.jasc.com

                           Personal Web Page:   http://www.visi.com/~nde

Question authority...and the authorities will question YOU!
------------------------------------------------------------------------



Sat, 15 Sep 2001 03:00:00 GMT  
 vc++ 5.0 to vc++ 6.0 problem
    It would be important to see what values of C & I it's called with.
Also, any particular reason why you passing the char by reference?  (and
both modifying and returning it)

--
Truth,
   James [MVP]
http://www.NJTheater.Com       -and-
http://www.NJTheater.Com/JamesCurran

Quote:

>The following code crashes with a access violation in vc++ 6.0, but
>works fine in vc++5.0:

>char bitoff (char& c, char i) { return c &= ~(1 << i; }



Sat, 15 Sep 2001 03:00:00 GMT  
 vc++ 5.0 to vc++ 6.0 problem
Yes, I typed it in this message wrong... in my code it is:

char bitoff (char& c, char i) { return c &= ~(1 << i); }

Thanks.

Quote:


> >The following code crashes with a access violation in vc++ 6.0, but
> >works fine in vc++5.0:

> >char bitoff (char& c, char i) { return c &= ~(1 << i; }

> >I would appreciate any suggestions.

> Syntax error:  Missing ")" - return statement

> ------------------------------------------------------------------------
> Andy Yee                   Corporate E-Mail:    See Above
> Software Engineer          Coporate Web Page:   http://www.jasc.com

>                            Personal Web Page:   http://www.visi.com/~nde

> Question authority...and the authorities will question YOU!
> ------------------------------------------------------------------------



Sun, 16 Sep 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VC 5.0 and VC 6.0 compatibility problem ?

2. Problem upgrading from VC 5.0 to VC 6.0

3. vc++ 5.0 programs and vc++ 6.0

4. Help:VC++ 5.0 and VC++ 6.0 compatibility problems!

5. Help:VC++ 6.0 and VC++ 5.0 compatibility problems!

6. Debugging VC 6.0 Project under VC 5.0

7. Co-install of VC 5.0 and VC 6.0

8. : VC 5.0 vs VC 6.0 incompatibility

9. : VC 5.0 vs VC 6.0 run time incompatibility

10. : VC 5.0 and VC 6.0 run time compatibility

11. VC 6.0 breaks VC 5.0 DLLs?

 

 
Powered by phpBB® Forum Software