long int before a variable name

asked 2021-01-10 18:41:38 -0500

RDLUIS gravatar image

I saw in a code the next statement ROS_INFO("sum %ld ", (long int)service.response.sum );

so I know the variable of the service sum is an int64 but what is the (long int) statement for?????? note : the code is in C++

edit retag flag offensive close merge delete

Comments

1

(long int) casts int64 type to long int type.

skpro19 gravatar image skpro19  ( 2021-01-11 13:03:35 -0500 )edit

and why I want to convert int64 to long int???

RDLUIS gravatar image RDLUIS  ( 2021-01-12 12:47:01 -0500 )edit