Yes, the pwm works from values 0 to 1.
In order to make your code work use:
printf("value written on the pin : %f\n",value);
Is the code working as you want? If you want the same behavior in the Arduino code and in the C++ code, change the delays and start checking the behavior in each one of them.
Intel Galileo Gen 2 Eurobot videos :-
yes thanks a lot i was able to figure out the error in %d and the above code is working for the motors as well.
the community has been very helpful