Ok I want to make an array to hold a name, char name2[12]; or int name[12] should have made me an array but when I type name[1]=3; for example, it comes up with alot of errors, should I use a string? I tried the same things with a string but the same errors came up.
Code:#include <iostream.h> struct database { int id_number; int age; float salary; int name[12]; char name2[12]; }; int main() { database employee; employee.age=22; employee.id_number=19; employee.salary=12000; cout<<"ID NUMBER :"<<employee.id_number<<endl; cout<<"Age :"<<employee.age<<endl; cout<<"salary earned :"<<employee.salary<<endl; return 0; }