both commands work in the terminal

On Saturday, December 21, 2013 9:52:27 PM UTC+5:30, Dhanushka Jayaweera 
wrote:
>
> well i tried this 
> *system("echo cape-bone-iio > /sys/devices/bone_capemgr.9/slots");*
>
> still the same
>
> On Saturday, December 21, 2013 9:40:04 PM UTC+5:30, Bas Laarhoven wrote:
>>
>>  On 21-12-2013 17:04, Dhanushka Jayaweera wrote:
>>  
>> hey guys, 
>>
>>  I want to add this bash command to my c++ program. 
>> *echo cape-bone-iio > /sys/devices/bone_capemgr.*/slots*
>>  
>>  i tried this
>>  *#include<cstdio>*
>> *#include<cstdlib>*
>> *#include<unistd.h>*
>> *using namespace std;*
>> *int main() {*
>> *    system("echo cape-bone-iio > /sys/devices/bone_capemgr.*/slots");*
>> *    return 0;*
>> *}*
>>
>>  but it does not work. 
>>
>>  Can someone help me with this?
>>  -- 
>> For more options, visit http://beagleboard.org/discuss
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to beagleboard...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>> Have you verified that the system command does wildcard expansion?
>> (Replace the asterisk in the command by the proper number and verify 
>> whether that works)
>>
>> -- Bas
>>
>>  

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to