ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

what's the exact meaning of :: in Ros( C++ )

asked 2018-11-30 06:28:55 -0500

Chung Oh gravatar image

hello guys. I'm a beginer in Ros. I read lots of " :: " . ex) ros::init(argc, argv, "talker"); what's the exact meaning of ::? plz... Im really suffering from it. and do you think it's better to use c++ than python? can you recommand?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
6

answered 2018-11-30 12:48:07 -0500

gvdhoorn gravatar image

updated 2018-11-30 12:48:34 -0500

Technically, your question is a C++ question, not a ROS question, and we should be closing this.

But just to point you in the right direction: the double colon (::) you see in C++ source code is called the scope resolution operator. It is used to tell the compiler in which scope the identifier (ie: name of something) that follows can be found.

If you search for "C++ scope resolution operator" you will probably find more than enough information about this (Wikipedia also has a page about it: wikipedia.org/Scope_resolution_operator).

edit flag offensive delete link more

Comments

Really thanks for your explaination :) hundred percent I got. Thanks

Chung Oh gravatar image Chung Oh  ( 2018-12-01 00:43:21 -0500 )edit
0

answered 2021-02-28 07:35:03 -0500

jsuero gravatar image

its like the dot in java or c#

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-11-30 06:28:55 -0500

Seen: 835 times

Last updated: Nov 30 '18