What I need to do is have input from one line (integers) and then put them into different variables... Let me explain with code:
THEORETICAL CODE:
Code:
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int input[6]; //This will be the array for input
cin >> input[]; //I know this wont work. What I want to do is
//the input will be seperated by comas...
//ie: 1,2,3,4,5,6
//How can i do this so that the "1"
//goes into input[0].. the "2" into input[2]ect??
system("PAUSE");
return 0;
}
Get it? after that I take the numbers individually and put them into variables... but that is unimportant.
Thanks for all your help!!
~Nick