How can I show C++ code documentation in Xcode 9.3?

后端 未结 3 359
走了就别回头了
走了就别回头了 2021-01-12 03:51

I´m developing software based on C++ in Xcode and want to have (at least) the same convenience for code documentation as if I was developing for Swift or objc.

Exam

3条回答
  •  Happy的楠姐
    2021-01-12 04:22

    This is for your custom class. You can add your comment like this - in the header I do this

     /**
         * Method name: name
         * Description: returns name
         * Parameters: none
         */
    

    here is a sample I did -

    #ifndef test_hpp
    #define test_hpp
    
    #include 
    #include 
    
    class myclass{
    private:
        std::string name_;
    
    public:
    
        myclass(std::string);
        /**
         * Method name: name
         * Description: returns name
         * Parameters: none
         */
        std::string name();
    };
    
    #endif /* test_hpp */
    

提交回复
热议问题