CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 21

Thread: String problems

Threaded View

  1. #1
    Join Date
    Jan 2009
    Posts
    25

    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
    Code:
    "IL\\UNZIP.EXE"
    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
  •  





Click Here to Expand Forum to Full Width

Featured