Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

I am having some problem with system() function in C and need help.

OpenStudy (hba):

Please elaborate.

OpenStudy (anonymous):

I was writing a software in C that uses Alternate Data Streams in Windows NTFS file system to hide files behind another files but the system() is not doing its working correctly.

OpenStudy (hba):

OOP?

OpenStudy (anonymous):

sorry, I didn't understood OOP

OpenStudy (anonymous):

what were u trying to say through OOP

OpenStudy (anonymous):

here is what I wrote: http://pastebin.com/r5wUjsbZ

OpenStudy (anonymous):

C is not OOP

OpenStudy (rsmith6559):

I don't believe that system() has printf()'s capabilities. Try doing your concatenation and then just give system() a pointer to your conctenated command.

OpenStudy (anonymous):

Like rmsith6559 said, the system() function only accepts a single string (which should contain the command you want to run). You can use other functions, like e.g. sprintf(), to format a string, then pass that string to system(). Out of curiosity, why are trying to hide files behind other files?

OpenStudy (anonymous):

I used sprintf also but that didn't worked. you can see here: http://pastebin.com/jpavMgv8

OpenStudy (anonymous):

@slotema for your curiosity, I was just applying my knowledge of ADS in C as a software which'll be open source.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!