-
February 17th, 2009, 04:20 AM
#1
String problems
I'm using Borland C++ for DOS 3.1, and lately I have been having some weird problems with strings. For example, I have a function that copies a file binary
Code:
int copyfile(char source[], char dest[])
and when I access the function:
Code:
copyfile("CTA2\\SYSTEM\\POINTER.CTA", "CTA2\\SYSTEM\\TEMP.CTA");
In the step by step debugging I discovered that the source is changed to
That is the final part from a previous execution of the function.
Why is that???
It is not the only string-related problem, it took me a long while to fix a problem where it was reading from a string and writing in two others at the same time, when I only asked it to write in one string.
How can this be fixed?
Last edited by chibicitiberiu; February 17th, 2009 at 04:27 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|