Is there a better way to execute commands from c++ than system("CMD")?
For example, rather than calling
Code:
system("mount -t cifs -ouid="+user+" "+share+" "+mountpoint);
Can I just call whatever functions are used by /bin/mount and pass my options as paramters?
Code:
#import <libmount>
mount("cifs", user, share, mountpoint);
Thanks.