Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 13th, 2004, 07:04 PM
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 69
Thanks: 0
Thanked 1 Time in 1 Post
Default XOR Two Arrays

I have two 256 element byte arrays. If either arr1 or arr2 is set to 0x80 then arr1 should be 0x80. This is what I am doing now:

for(int i=0;i<256;i++)
  arr1[i] |= arr2[i];

My question is... Is there a way to do this without the loop?

www.CoderForRent.com
Get A Computer Job!
Reply With Quote
  #2 (permalink)  
Old September 14th, 2004, 12:57 PM
Friend of Wrox
 
Join Date: Jul 2004
Location: Tehran, , Iran.
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,
what do you mean from a way without loop?!!!
two possible ways are :
1-using loops
2-using recursive functions
the best one is using loop cycles ...

--------------------------------------------
Mehdi.:)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
arrays ozPATT Excel VBA 2 November 4th, 2005 06:11 AM
Multidemmesional Arrays OR arrays gmoney060 Classic ASP Basics 3 November 1st, 2004 03:42 PM
Arrays tajin Excel VBA 0 June 20th, 2004 09:07 AM



All times are GMT -4. The time now is 11:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.