I cannot seem to get my program to run. I know it seems like a simple program but i am new to this.
I am trying to:
- create a 5 element integer array
- cin 6 numbers
- then cout that array to see what my program looks like at runtime.
but keep getting errors. Here is what i have coded so far:
Code:#include<iostream> #include<string> using namespace std; using std::cin; int main() { //n is an array of 5 elements. int firstString[5]; cin >> int; cout << firstString << endl; cout << endl; cout << "firstString is: " << firstString << endl; cout << endl; for (int i = 0; firstString[i] != '\0'; i++) cout << firstString[i] << ' '; cout << endl; return 0; }



LinkBack URL
About LinkBacks


