Arrays

Hi , I know how to do arrays for example :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;

int main ()
{
    
    int Array[] = {1};
    int answer;
    
    cout <<"What is Array 1 : "  << endl;
    cin >> answer; 
    
    if (Array[0] = 1)
    {
                 cout <<"Yes , Thats right" << endl;
                 }
                 
              
  
system("pause");   
}


But i don't quite understand them... Any help please.

Thanks
Arrays are used to store a sequence of objects
Check the tutorial: http://www.cplusplus.com/doc/tutorial/arrays/
A std::vector does the same but it's better than built-in arrays: http://www.cplusplus.com/reference/stl/vector/
thanks but havent got that far yet to learn vectors can you explain in detail about arrays ... What they do , What there used for... How they work.

Thanks
Everything you need to know is in the tutorial
i know but i still don't quite understand it thats why im here so someone can explain it more simple
IMO, vectors should be learned before arrays, since they're more high level and easier to use.
im just goin along with the tutorials in order thats all. I can do arrays but i just don't understand them and how they are used.
Topic archived. No new replies allowed.