Results 1 to 3 of 3

Thread: QByteArray processing (seeking equivalent QT code)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    107
    Thanks
    36
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Red face QByteArray processing (seeking equivalent QT code)

    Hi,

    Could someone please tell me the C++/Qt4 equivalent of this?

    PHP CODE

    Qt Code:
    1. $input_250="432345566180632659";
    2.  
    3. $input_Value=array();
    4.  
    5. //250 IN29
    6. $dec = $input_250;
    7. $byte = 8;
    8. for($i=0;$i<$byte;$i++)
    9. {
    10. if($i>0)
    11. {
    12. $input_Value[$i] = gmp_mod(gmp_div_q($dec,gmp_pow(2, $i*8)),256);
    13. }
    14. else
    15. {
    16. $input_Value[$i] = gmp_mod($dec,256);
    17. }
    18. }
    To copy to clipboard, switch view to plain text mode 

    I'm storing the $input_250 in Qt in a QByteArray.
    This number is represented as a longlong .

    Any help would surely be appreciated!

    BR,
    Pedro Doria Meunier
    Last edited by pdoria; 12th July 2009 at 13:24. Reason: updated contents

Similar Threads

  1. problem with linking
    By mickey in forum Qt Programming
    Replies: 49
    Last Post: 12th August 2006, 21:41

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.