Menu

How can I conver from vec to a C pointer dat.

wavestar
2008-04-11
2012-09-15
  • wavestar

    wavestar - 2008-04-11

    Hi,
    Is there any good method to convert a it++ ivec output
    to a pointer? I need a interface to other functions. The result of my
    it++ turbo decode data is a ivec.
    So I want to return a pointer, the int pointer should point to the ivec datas.

    Thanks,

     
    • vasek

      vasek - 2008-04-15

      What about the _data() method of ivec? It is documented as "not recommended to use", but I am using it time to time...

       
      • Adam Piątyszek

        Adam Piątyszek - 2008-04-15

        Vasek is right. You can try to use the _data() method to obtain the pointer to the internal data of the vector.

        /Adam

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.