rohit35

convert

Mar 17th, 2018
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. size_t convert(void *data,size_t size)
  2. {
  3. if (size == 4)
  4. {
  5. int idx = *(int*)data;
  6. return idx;
  7. }
  8. else
  9. {
  10. printf("here\n");
  11. float value = *(float*)data;
  12. printf("%f\n",value);
  13. return value;
  14. }
  15. }
Add Comment
Please, Sign In to add comment