Kate101
Badges: 1
Rep:
?
#1
Report Thread starter 13 years ago
#1
Hey Guys

I posted code for a shopping cart about a week ago. I still havent sorted the problem out, if any of you can explain how I can solve recursion I would appreciate it.


Kate
0
reply
Kate101
Badges: 1
Rep:
?
#2
Report Thread starter 13 years ago
#2
Well its a shopping cart, so its to do with variables of price, item and total cost. I run the order once, it displays each of these undefined. I run the order again, it works fine.
0
reply
JamieB
Badges: 0
Rep:
?
#3
Report 13 years ago
#3
Thats definitely a tail recursion solution (iteration), nothing to do with recursion, it is unnecessary and will be slower.
0
reply
Kate101
Badges: 1
Rep:
?
#4
Report Thread starter 13 years ago
#4
Any ideas how to solve this?
0
reply
slugonamission
Badges: 0
Rep:
?
#5
Report 13 years ago
#5
post the code back up and we may be able to help you
0
reply
Kate101
Badges: 1
Rep:
?
#6
Report Thread starter 13 years ago
#6
code attached

Note: The code will only work if you take '1' off the end of the file names. It would'nt let me send the html pages.

Thanks

I have also included a screenshot of the error.
Attached files
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Why do you want to do a masters?

Great for my career (51)
35.42%
I really love the subject (39)
27.08%
I don't know what else to do (20)
13.89%
I can't get a job (8)
5.56%
My parents want me to (3)
2.08%
I don't know... I just do (23)
15.97%

Watched Threads

View All