Hey i was wondering if there was anyway to take a 'string' and use it in place of an int/char or whatever.
ie
Im not sure if that makes sense...but lets say ive got a large program with many 'shape instances' and I dont want to make a huge 'switch/case'. So instead of 'switch/case' I just take user input and somehow change it into a 'variable' and pass it into a function.Code:cout<<"Type in what kind of shape you would like.\n"; cin>>Shape_Name; Draw(Shape_Name);
*shrugs*maybe that is a foolish request, but if that were possible...man that would open up a whole new world to me =/