Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
c [2020/06/18 02:21]
paul
c [2020/06/18 02:22] (current)
paul [Mutable]
Line 292: Line 292:
 </​code>​ </​code>​
  
-sf::Sprite* re_sprite_hair,​ re_sprite_body,​ re_sprite_eyes;​+==== Pointer Syntax ==== 
 + 
 + 
 +<code cpp>sf::Sprite* re_sprite_hair,​ re_sprite_body,​ re_sprite_eyes;​</​code>​
  
 Does not declare 3 pointers - it is one pointer and 2 objects. Does not declare 3 pointers - it is one pointer and 2 objects.
  
 +<code cpp>
 sf::Sprite* unfortunately does not apply to all the variables declared following it, just the first. It is equivalent to sf::Sprite* unfortunately does not apply to all the variables declared following it, just the first. It is equivalent to
  
Line 301: Line 305:
 sf::Sprite re_sprite_body;​ sf::Sprite re_sprite_body;​
 sf::Sprite re_sprite_eyes;​ sf::Sprite re_sprite_eyes;​
 +</​code>​
 +
 You want to do: You want to do:
  
 +<code cpp>
 sf::Sprite *re_sprite_hair,​ *re_sprite_body,​ *re_sprite_eyes;​ sf::Sprite *re_sprite_hair,​ *re_sprite_body,​ *re_sprite_eyes;​
 +</​code>​
  • c.txt
  • Last modified: 2020/06/18 02:22
  • by paul