What type is a points vector in objective C











up vote
0
down vote

favorite












I have the following declaration for a function and I don't know what I am doing wrong with regards to the type declaration:



//function is defined in the OpenCVWrapper.mm file .....no errors
+ (NSArray *)analysePoints:(std::vector<cv::Point> )pointsVector{
.......
}

//error is in the OpenCVWrapper.h file
@interface OpenCVWrapper : NSObject

+ (NSArray *)analysePoints:(NSMutableArray *)mutableArray:(std::vector<cv::Point>)pointsArray;
//red marker under the std
@end


I am getting the error "expecting type" for the vector. What am I doing wrong here?










share|improve this question
























  • You haven't provided enough information for us to help you. Please copy and paste the exact wording of the message. Also, it would help if we knew which files you were importing into this source file (that is, which headers). Also, what is the name of your source file? Does it end in ".m" or ".mm", or something else?
    – user1118321
    Nov 8 at 5:33










  • just added information requested above. "Expected a type" is the error message.
    – kangarooChris
    Nov 8 at 5:57










  • sorry, just noticed that I deleted the NSMutableArray part to avoid confusion, but in the addition I did not delete it. So the first statement in .mm file is + (NSArray *)analysePoints:(NSMutableArray *)mutableArray : (std::vector<cv::Point> )pointsArray{....
    – kangarooChris
    Nov 8 at 5:59










  • By "exact wording of the message" I mean the entire message - the file name, the text it's complaining about and everything else. It makes a difference to helping you. Also, you haven't told us which headers you're including. Finally, the spacing between arguments in your header file is ambiguous to the compiler. There should be a space between mutableArray and the :(std::vector<cv::Point>)pointsArray part. The compiler should warn you about that, though the warning may be masked by the error.
    – user1118321
    Nov 8 at 6:18










  • can I ask a different question? What is the type of a vector? The compiler asks for a type and I seem to not provide the right type. The above is really all there is (no additional info about the error message) except that I am also including #import <Foundation/Foundation.h>. #import <UIKit/UIKit.h>. Thank you for your patience!
    – kangarooChris
    Nov 8 at 6:36

















up vote
0
down vote

favorite












I have the following declaration for a function and I don't know what I am doing wrong with regards to the type declaration:



//function is defined in the OpenCVWrapper.mm file .....no errors
+ (NSArray *)analysePoints:(std::vector<cv::Point> )pointsVector{
.......
}

//error is in the OpenCVWrapper.h file
@interface OpenCVWrapper : NSObject

+ (NSArray *)analysePoints:(NSMutableArray *)mutableArray:(std::vector<cv::Point>)pointsArray;
//red marker under the std
@end


I am getting the error "expecting type" for the vector. What am I doing wrong here?










share|improve this question
























  • You haven't provided enough information for us to help you. Please copy and paste the exact wording of the message. Also, it would help if we knew which files you were importing into this source file (that is, which headers). Also, what is the name of your source file? Does it end in ".m" or ".mm", or something else?
    – user1118321
    Nov 8 at 5:33










  • just added information requested above. "Expected a type" is the error message.
    – kangarooChris
    Nov 8 at 5:57










  • sorry, just noticed that I deleted the NSMutableArray part to avoid confusion, but in the addition I did not delete it. So the first statement in .mm file is + (NSArray *)analysePoints:(NSMutableArray *)mutableArray : (std::vector<cv::Point> )pointsArray{....
    – kangarooChris
    Nov 8 at 5:59










  • By "exact wording of the message" I mean the entire message - the file name, the text it's complaining about and everything else. It makes a difference to helping you. Also, you haven't told us which headers you're including. Finally, the spacing between arguments in your header file is ambiguous to the compiler. There should be a space between mutableArray and the :(std::vector<cv::Point>)pointsArray part. The compiler should warn you about that, though the warning may be masked by the error.
    – user1118321
    Nov 8 at 6:18










  • can I ask a different question? What is the type of a vector? The compiler asks for a type and I seem to not provide the right type. The above is really all there is (no additional info about the error message) except that I am also including #import <Foundation/Foundation.h>. #import <UIKit/UIKit.h>. Thank you for your patience!
    – kangarooChris
    Nov 8 at 6:36















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have the following declaration for a function and I don't know what I am doing wrong with regards to the type declaration:



//function is defined in the OpenCVWrapper.mm file .....no errors
+ (NSArray *)analysePoints:(std::vector<cv::Point> )pointsVector{
.......
}

//error is in the OpenCVWrapper.h file
@interface OpenCVWrapper : NSObject

+ (NSArray *)analysePoints:(NSMutableArray *)mutableArray:(std::vector<cv::Point>)pointsArray;
//red marker under the std
@end


I am getting the error "expecting type" for the vector. What am I doing wrong here?










share|improve this question















I have the following declaration for a function and I don't know what I am doing wrong with regards to the type declaration:



//function is defined in the OpenCVWrapper.mm file .....no errors
+ (NSArray *)analysePoints:(std::vector<cv::Point> )pointsVector{
.......
}

//error is in the OpenCVWrapper.h file
@interface OpenCVWrapper : NSObject

+ (NSArray *)analysePoints:(NSMutableArray *)mutableArray:(std::vector<cv::Point>)pointsArray;
//red marker under the std
@end


I am getting the error "expecting type" for the vector. What am I doing wrong here?







vector objective-c++






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 5:55

























asked Nov 8 at 4:43









kangarooChris

203314




203314












  • You haven't provided enough information for us to help you. Please copy and paste the exact wording of the message. Also, it would help if we knew which files you were importing into this source file (that is, which headers). Also, what is the name of your source file? Does it end in ".m" or ".mm", or something else?
    – user1118321
    Nov 8 at 5:33










  • just added information requested above. "Expected a type" is the error message.
    – kangarooChris
    Nov 8 at 5:57










  • sorry, just noticed that I deleted the NSMutableArray part to avoid confusion, but in the addition I did not delete it. So the first statement in .mm file is + (NSArray *)analysePoints:(NSMutableArray *)mutableArray : (std::vector<cv::Point> )pointsArray{....
    – kangarooChris
    Nov 8 at 5:59










  • By "exact wording of the message" I mean the entire message - the file name, the text it's complaining about and everything else. It makes a difference to helping you. Also, you haven't told us which headers you're including. Finally, the spacing between arguments in your header file is ambiguous to the compiler. There should be a space between mutableArray and the :(std::vector<cv::Point>)pointsArray part. The compiler should warn you about that, though the warning may be masked by the error.
    – user1118321
    Nov 8 at 6:18










  • can I ask a different question? What is the type of a vector? The compiler asks for a type and I seem to not provide the right type. The above is really all there is (no additional info about the error message) except that I am also including #import <Foundation/Foundation.h>. #import <UIKit/UIKit.h>. Thank you for your patience!
    – kangarooChris
    Nov 8 at 6:36




















  • You haven't provided enough information for us to help you. Please copy and paste the exact wording of the message. Also, it would help if we knew which files you were importing into this source file (that is, which headers). Also, what is the name of your source file? Does it end in ".m" or ".mm", or something else?
    – user1118321
    Nov 8 at 5:33










  • just added information requested above. "Expected a type" is the error message.
    – kangarooChris
    Nov 8 at 5:57










  • sorry, just noticed that I deleted the NSMutableArray part to avoid confusion, but in the addition I did not delete it. So the first statement in .mm file is + (NSArray *)analysePoints:(NSMutableArray *)mutableArray : (std::vector<cv::Point> )pointsArray{....
    – kangarooChris
    Nov 8 at 5:59










  • By "exact wording of the message" I mean the entire message - the file name, the text it's complaining about and everything else. It makes a difference to helping you. Also, you haven't told us which headers you're including. Finally, the spacing between arguments in your header file is ambiguous to the compiler. There should be a space between mutableArray and the :(std::vector<cv::Point>)pointsArray part. The compiler should warn you about that, though the warning may be masked by the error.
    – user1118321
    Nov 8 at 6:18










  • can I ask a different question? What is the type of a vector? The compiler asks for a type and I seem to not provide the right type. The above is really all there is (no additional info about the error message) except that I am also including #import <Foundation/Foundation.h>. #import <UIKit/UIKit.h>. Thank you for your patience!
    – kangarooChris
    Nov 8 at 6:36


















You haven't provided enough information for us to help you. Please copy and paste the exact wording of the message. Also, it would help if we knew which files you were importing into this source file (that is, which headers). Also, what is the name of your source file? Does it end in ".m" or ".mm", or something else?
– user1118321
Nov 8 at 5:33




You haven't provided enough information for us to help you. Please copy and paste the exact wording of the message. Also, it would help if we knew which files you were importing into this source file (that is, which headers). Also, what is the name of your source file? Does it end in ".m" or ".mm", or something else?
– user1118321
Nov 8 at 5:33












just added information requested above. "Expected a type" is the error message.
– kangarooChris
Nov 8 at 5:57




just added information requested above. "Expected a type" is the error message.
– kangarooChris
Nov 8 at 5:57












sorry, just noticed that I deleted the NSMutableArray part to avoid confusion, but in the addition I did not delete it. So the first statement in .mm file is + (NSArray *)analysePoints:(NSMutableArray *)mutableArray : (std::vector<cv::Point> )pointsArray{....
– kangarooChris
Nov 8 at 5:59




sorry, just noticed that I deleted the NSMutableArray part to avoid confusion, but in the addition I did not delete it. So the first statement in .mm file is + (NSArray *)analysePoints:(NSMutableArray *)mutableArray : (std::vector<cv::Point> )pointsArray{....
– kangarooChris
Nov 8 at 5:59












By "exact wording of the message" I mean the entire message - the file name, the text it's complaining about and everything else. It makes a difference to helping you. Also, you haven't told us which headers you're including. Finally, the spacing between arguments in your header file is ambiguous to the compiler. There should be a space between mutableArray and the :(std::vector<cv::Point>)pointsArray part. The compiler should warn you about that, though the warning may be masked by the error.
– user1118321
Nov 8 at 6:18




By "exact wording of the message" I mean the entire message - the file name, the text it's complaining about and everything else. It makes a difference to helping you. Also, you haven't told us which headers you're including. Finally, the spacing between arguments in your header file is ambiguous to the compiler. There should be a space between mutableArray and the :(std::vector<cv::Point>)pointsArray part. The compiler should warn you about that, though the warning may be masked by the error.
– user1118321
Nov 8 at 6:18












can I ask a different question? What is the type of a vector? The compiler asks for a type and I seem to not provide the right type. The above is really all there is (no additional info about the error message) except that I am also including #import <Foundation/Foundation.h>. #import <UIKit/UIKit.h>. Thank you for your patience!
– kangarooChris
Nov 8 at 6:36






can I ask a different question? What is the type of a vector? The compiler asks for a type and I seem to not provide the right type. The above is really all there is (no additional info about the error message) except that I am also including #import <Foundation/Foundation.h>. #import <UIKit/UIKit.h>. Thank you for your patience!
– kangarooChris
Nov 8 at 6:36














1 Answer
1






active

oldest

votes

















up vote
1
down vote













Actually, I found the solution through user11118321 input to look at the bigger picture. I am using this set up in a swift app that uses openCV through a bridging header. It is actually not possible to import or use a vector in swift.






share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53201664%2fwhat-type-is-a-points-vector-in-objective-c%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Actually, I found the solution through user11118321 input to look at the bigger picture. I am using this set up in a swift app that uses openCV through a bridging header. It is actually not possible to import or use a vector in swift.






    share|improve this answer

























      up vote
      1
      down vote













      Actually, I found the solution through user11118321 input to look at the bigger picture. I am using this set up in a swift app that uses openCV through a bridging header. It is actually not possible to import or use a vector in swift.






      share|improve this answer























        up vote
        1
        down vote










        up vote
        1
        down vote









        Actually, I found the solution through user11118321 input to look at the bigger picture. I am using this set up in a swift app that uses openCV through a bridging header. It is actually not possible to import or use a vector in swift.






        share|improve this answer












        Actually, I found the solution through user11118321 input to look at the bigger picture. I am using this set up in a swift app that uses openCV through a bridging header. It is actually not possible to import or use a vector in swift.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 8 at 6:52









        kangarooChris

        203314




        203314






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53201664%2fwhat-type-is-a-points-vector-in-objective-c%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Tangent Lines Diagram Along Smooth Curve

            Yusuf al-Mu'taman ibn Hud

            Zucchini