Guest User

Untitled

a guest
Jun 22nd, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. typedef struct opent_response {
  5.   float x, y, z, yaw, pitch, roll;
  6. }opent_t;
  7.  
  8. int main ( void ) {
  9.  
  10.   opent_t opent_s = {0};
  11.   const char *x = "12.43";
  12.   const char *y = "10.21";
  13.   const char *z = "0.25";
  14.  
  15.   opent_s.x = atof(x);
  16.   opent_s.y = atof(y);
  17.   opent_s.z = atof(z);
  18.  
  19.   printf("%f\n", opent_s.x);
  20.   printf("%f\n", opent_s.y);
  21.   printf("%f\n", opent_s.z);
  22.   // и т.д
  23.   return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment