EDIT: First time I did this I asked too many questions. Now I am not providing enough detail. Simply c-outing an array is not helping because I am trying to do arithmetic with the array and it is misinterpreting data. It might help in figuring out what the problem is, so I am marking it as the correct answer and making a new post. I don't know what else to do, I am clearly not getting the big picture through to readers.
I need a user-defined string to be interpreted by the program as an array. I tried to implement advice from user463035818 but I don't think it's coming out correctly.
The array I am talking about is initialized as arrnStoreInput01A at the top of this portion of the program (which I have cropped so it's easier to read). I instruct the user to enter three numbers in the format "i, j, k" (I will change to "i j k" if that is better--I have tested both). The way things are now, when I ask the program to spit the result back at me (4th line from the bottom), it spits out a hexidecimal instead of {i,j,k} whether or not I use commas (result is different hex, though).
What happened? How can I fix this so I have a 1x3 array of integers that I can perform arithmetic operations on, i.e. 3*arrnStoreInput01A? Thank you.
#include "stdafx.h"
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <limits>
#include <tuple>
int main()
{
int nNumCup = 0, nNumLem = 0, nNumSug = 0, nNumIce = 0;
float fCoH = 20.00, fCostCup25 = 1.99, fCostCup50 = 2.49, fCostCup100 = 2.99;
int arrnStoreInput01A[3];
std::cout << "Go to Cups \n \n";
std::cout << "Cups are availible in packs of 25, 50 and 100. \n"
"Please enter three numbers in \"i,j,k\" format for the \n"
"respective amounts of each of the following three products \n"
"you want to buy: \n \n"
"A) 25-pack of cups for " << fCostCup25 << "\n"
"B) 50-pack of cups for " << fCostCup50 << "\n"
"C) 100-pack of cups for " << fCostCup100 << "\n \n"
"For example, type \"0,4,0\" to purchase 4 packages of 50 cups or \n"
"type \"3,2,1\" to buy 3 packages of 25 cups, 2 packages of 50 cups \n"
"and 1 package of 100 cups. \n \n";
std::cin >> arrnStoreInput01A[0] >> arrnStoreInput01A[1] >> arrnStoreInput01A[2];
float arrnCostCup[3] = { fCostCup25,fCostCup50,fCostCup100 };
int arrnQuantCup[3] = { 25,50,100 };
std::cout << arrnStoreInput01A;
return 0;
}