Is it possible to indicate that a class function you are calling is static?

class Point
{
std::string name;
	public:
		Point(){}
		static void DisplayName() { std::cout << "Point" << std::endl;}
};

int main()
{
  Point.DisplayName(); //this doesn't indicate the the member function is static
//maybe something like this:
//static_call(Point.DisplayName()); //just to indicate to the reader that this call makes sense without an instance of the class
}

There are several times where I dont remember even in my own code that I am calling a static function.

Thanks,

Dave

Use the functions qualified name i.e. class_name::function_name(parameteres)

In your case, call it as: Point::DisplayName() This will make clear that DisplayName is either a static function from a class Point or it is a Simple function in the Point namespace.
If the code reader knows that Point is a class, he will surly understand that DisplayName is a static member.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.