Ok i have an assignment that required me to create a simple database using C++. I tried using both ways which is structures and 2d arrays. But it just keep crashing the command prompt!! Can somebody take a look at the code and tell me the problem? Thank you very much in advance. P.S: I am new to programming. I can hardly understand classes so please be detailed in your explaination.
---------------------------------------------------------------
the structure program
------------------------------------------------------------
#include <iostream>
using namespace std;
int add_record()
{struct weapon
{int id;
int name;
int quantity;
};
int i,k,size,l;
i=1;
l=0;
k=1;
size=0;
weapon add[size];
cout<< "Enter size of record"<< endl;
cin>> size;
Bookmarks