dimanche 9 mai 2021

How to concate two pointer character?

I am building a fast copy application using xcopy. I want to pass two variable source and destination to system(); I am trying like this

char *source = "D:\SOFTWARE\Internet"; char *destination = " D:\test /s /e /d /y";

system("xcopy "+source+destination);

But it doesnt work. It work fine in java. same code. Thanks.

Aucun commentaire:

Enregistrer un commentaire