# Attaching an object and assigning variables

**URL:** <https://forum.kirupa.com/t/attaching-an-object-and-assigning-variables/311586>\
**Category:** programming\
**Created:** [July 11, 2010, 2:36pm UTC](https://forum.kirupa.com/t/attaching-an-object-and-assigning-variables/311586 "2010-07-11T14:36:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skribble](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Skribble](https://forum.kirupa.com/u/Skribble)\
**Post date:** [July 11, 2010, 2:36pm UTC](https://forum.kirupa.com/t/attaching-an-object-and-assigning-variables/311586/1 "2010-07-11T14:36:05Z")

</div>

Hey guys. I’ve been programming in Flash for about 7 years now, and I’ve dabbled in Python and Java, so I’m pretty well versed in OOP. Recently I’ve been trying my hand at C++, and so far it’s been fairly easy; I recognize a lot of the fundamentals, it’s just the syntax I need to get used to.

Anywho, I’ve just been doing text based stuff, couting things, making arrays, etc. But I want to start experimenting with creating environments for some simple games like a basic platformer or snake style game to get started.

So my question is, how do I make a display and attach a sprite which can display a graphic/animation, and then give that object some variables/functions?

Thanks in advance, guys!

Brendan
