View Single Post
Old 04-14-2004, 11:53 PM   #2 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
well, i won't do your homework for you, but if you post up what you tried, maybe we can help you out with it.

first, though, the code you pasted has a bug:
Code:
for(int index = '0'; string1[index] != 0; ++index)
'0' is NOT the same as 0 (in fact, '0' = 48). you probably want index to start from 0, not '0'.

looks like your professor gave you half of the solution. look at that code and think about what it does. what state will your arrays be in once it does a few iterations? when does it stop? what else do you need to do to complete the problem.
joe_bruin is offline   Reply With Quote