   How can I store a set of veribles in a group
  I have a bunch of veribles that I need to group together. How would I do that?   
  Depends, that's a pretty generic question.  What are you trying to do with them?   ;  As in a class or struct? Maybe I'm missing something, but you can "group variables" using a  struct or for C++ a  class Sorry if you ment something totally differentHope this helpsRegards,/Omid;  Its hard for me to explain. But I am going to try my best.So I haveAnimName BallExplodeFile BallExplode.bmp Left 1 Right 1 Top 1 Bottom 1  Red 1 Green 1 Blue 1 Delay 1 Width 1 FrameW 1 ;What I need to do is load all that data to something and keep it all togetherSo when my drop down box has BallExplode and BallSpin the user selects BallExplode all the correct variables for that selection will load and vise versa when Ball spin is selected;Quote:Original post by kingpinzsIts hard for me to explain. But I am going to try my best.So I haveAnimName BallExplodeFile BallExplode.bmp Left 1 Right 1 Top 1 Bottom 1  Red 1 Green 1 Blue 1 Delay 1 Width 1 FrameW 1 ;What I need to do is load all that data to something and keep it all togetherSo when my drop down box has BallExplode and BallSpin the user selects BallExplode all the correct variables for that selection will load and vise versa when Ball spin is selectedIf I'm understanding you correctly, you probably want a struct or a class.   ;Quote:AnimName BallExplodeFile BallExplode.bmpLeft 1Right 1Top 1Bottom 1Red 1Green 1Blue 1Delay 1Width 1FrameW 1 What you want (in C++) is a class.  It looks like this:class Animation{public:  string Name;  string Filename;  int Left;  int Right;  int Top;  int Bottom;  int Red;  int Green;  int Blue;  int Delay;  int Width;  int FrameW;};Then you can use that class like any other type of data, using the period (.) to get at its parts:int main(){  Animation ani;  ani.FrameW = 0;  ani.Red = 4;  //etc.  for(int i = 0; i < 10; i++)    IncrementFrame(ani);  return(0);}void IncrementFrame(Animation &a){  a.FrameW++;}Hope that helps!  You would find better support in the For Beginners forum.~BenDilts( void );   ;  So say I have a drop down box that loads all the animation types how do I associated every animation type with a set of variables? So user clicks animation type form drop down it will load all the variables need to accomplish that animation. So this question more of a structure how to thing. The animation type is loaded from the text file also.I am not sure how else to ask my question about my issue.   ;http://www.cplusplus.com/doc/tutorial/.Read the chapters about classes.-me   ;  well I read the tutorials and I am not sure how it fits in. I dont think I worded my probelm right.Proble:Parse text file to pull out relvent datastore Animation type in veriblesome how link that verible to the rest of the data(I think)Or another words some how when animation type slected all the veribles linked to that data type gets loaded.1)user loads data file2)program reads though data file to find differnt animation types3)animation type slected by user program loads aproperate data to play the animation(what bitmap to use how big the frame is, what the transparent color is, what the delay time is between frames, the size of the blt(let,right,top,bottom coords of each frame)I belive that is all that needs to be solved to get the animation to playiteams 1 and 2 are solved is solved. Iteam 3 is were I am having the issueHope all that makes sence. ;  Actually the correct answer appears to be a map.Check out std::map in the STL.   