Problem With Code

Hello I'am trying to write a program that allows the user to buy and sell products in a port then go to another port and buy and sell products. But there is a problem in the pruchase function. I can'nt figure out what the problem is so I would appriciate any help anyone can give me.

Dear Salem if you are reading this I want to you to know that I did think about how each function should work and what it should do but it's just that I rather get things done 1 at a time rather then doing everything together. Plus thank you for all your help so far.

What is the "problem"? Does it compile? Does it crash when you enter "hippo" instead of "123"? Does it crash all the time? Have you tried debugging it?

Part of your problem may be the fact that k is uninitialized in main(). Turn on compiler warnings!

dwk

Seek and ye shall find. quaere et invenies.

"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell