hi experts,
today i meet a new problem,
if i have a class and constructor with arguments,
example:
1 2 3 4 5 6 7 8 9 10
class student{
private:
int ID;
string name:
public:
student(int a, string b){
ID=a;
name=b;
}
};
Now in my main function how i delay a array of student and set value without using other method to do it? As u know, normally i will create a method like setStudent to set the value, but now i wonder can i do it with constructor?
then what i gonna write in my main?
example: (WRONG CODEEEE)!!
wow..
Galik, thx for the help!
it solved my problem.
and kempo, thx for the comment also.. i never know there is such way to declare constructor..
guess I have learn a new thing!! THX ALOT!!