gnu.gcc.help
[Top] [All Lists]

Re: display STL vector

Subject: Re: display STL vector
From: Miles Bader
Date: Sat, 29 Jul 2006 07:03:33 +0900
Newsgroups: gnu.gcc.help
Paul Pluzhnikov <ppluzhnikov-nsp@xxxxxxxxxxx> writes:
>       while $i < $n
>         print $arg0._M_start[$i++]
>       end

gcc has a syntax for this, the "@" operator -- "print *PTR @ NUM" wil
print out NUM elements pointed to by PTR, instead of just one.

So maybe something like:

  print *$arg0._M_start @ ($arg0._M_finish - $arg0._M_start)

-Miles
-- 
A zen-buddhist walked into a pizza shop and
said, "Make me one with everything."

<Prev in Thread] Current Thread [Next in Thread>
Privacy Policy