Add class to current post in query_post

save the main current post id into a variable and compare it in the loop with the current post id; example:

<?php $this_post = $post->ID; ?>
  <?php $temp_query = $wp_query; ?>                     
  <?php foreach(get_the_category() as $category) {                         
  $cat = $category->cat_ID; 
  }                         
query_posts('orderby=date&cat=" . $cat . "&order=desc&posts_per_page=-1');  
while( have_posts() ) : ?>
  <span<?php if( $this_post == $post->ID ) { echo ' class="current"'; } ?>>
   /*output of your posts here*/
  </span>
<?php endwhile;                    
?>