Hey guys I just started picking up c++. I have previously programed in python, and was a little confused as to the array syntax in c++. I am trying to make a cash register program. I want something like "hot dog" to correlate to 1.95. I do not want to make a new var for every item the user creates, so I was thinking I would use an array. How can I make an array to hold a word in whole. For instance "word[1] = "Hot dog";" and then how can I figure out that, "Hot dog" is "word[1]" so I can call "price[1]"? Am I even on the right track of thinking or what? Is there some method that I can search for, or look into?
Thanks,
Joe



LinkBack URL
About LinkBacks



