Both work. The angle brackets are preferable because this is a "system" include file specified with the -I option to the compiler. From the gcc documentation:
Both user and system header files are included using the preprocessing directive `#include'. It has two variants:
#include <
file>
#include "
file"
<
file>
. You can prepend directories
to the list of quote directories with the -iquote option.
Hello all,
I have a question about ROS C++ include convention: For header files
from another package, which include method is preferable?
#include <geometry_msgs/Twist.h>
or
#include "geometry_msgs/Twist.h"
Both compile correctly, and both are seen in the standard ROS stacks.
Joel
--
Research Assistant
Ocean Systems Laboratory
Heriot-Watt University, UK
_______________________________________________
ros-users mailing list
ros-users@code.ros.org
https://code.ros.org/mailman/listinfo/ros-users