Is anyone familiar with this problem in BorlandBuilderC++:

void Print(AnsiString Path){

When I pass this string to Print(AnsiString) and try to display it in Label1, I lose all '\' signs and text in Label1 looks like this : "C:Directory1Directory2Music.mp3"

Why is this like that?

Thank you!

You did not escape the back-slash character. All strings/literals will have this behaviour as the first back-slash will escape the following character so inorder to have a back-slash, you must escape it with another. You either need to do:



Command prompt will complain about the same thing to you. char's will behave the same and so will char*'s that's what I mean by literals. This is why \0 is the same as 0 which is known as the NULL character; usually appended to the literals to terminate them.