as a c++ beginner I developed a class but the compiler complains my constructor for the following object instantiation:
MANUAL A1(21,"AIR CONDITIONING",21,"AIR DISTRIBUTION",1,"RECIRC FAN LEFT",3,0,"a320_21_21_1_3_0.tif");
the class manual has the following elements:
short num_ch;
std::string nam_ch;
short num_se;
std::string nam_se;
short num_ss;
std::string nam_ss;
short page;
short sheet;
std::string pict;
My implementation idea of the constructor was as followes:
MANUAL::MANUAL(
short my_num_ch,
std::string my_nam_ch,
short my_num_se,
std::string my_nam_se,
short my_num_ss,
std::string my_nam_ss,
short my_page,
short my_sheet,
std::string my_pict,
)
{
num_ch = my_num_ch;
nam_ch = my_nam_ch;
num_se = my_num_se;
nam_se = my_nam_se;
num_ss = my_num_ss;
nam_ss = my_nam_ss;
page = my_page;
sheet = my_page;
pict = my_pict;
}
What is here wrong ?
Thanks for answers ?
best regards
electricprog
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have 2 things to twll you:
1) Please post questions concerning code in the https://sourceforge.net/forum/forum.php?forum_id=48211 forum
2) If you send me your entire code ( curtis8@hotmail.com ) I will have a better chance of finding your error. (Note: I will only fix your code, comment my fix, and send it back. I will in no way share it with others)
Curtis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear C++ champs,
as a c++ beginner I developed a class but the compiler complains my constructor for the following object instantiation:
MANUAL A1(21,"AIR CONDITIONING",21,"AIR DISTRIBUTION",1,"RECIRC FAN LEFT",3,0,"a320_21_21_1_3_0.tif");
the class manual has the following elements:
short num_ch;
std::string nam_ch;
short num_se;
std::string nam_se;
short num_ss;
std::string nam_ss;
short page;
short sheet;
std::string pict;
My implementation idea of the constructor was as followes:
MANUAL::MANUAL(
short my_num_ch,
std::string my_nam_ch,
short my_num_se,
std::string my_nam_se,
short my_num_ss,
std::string my_nam_ss,
short my_page,
short my_sheet,
std::string my_pict,
)
{
num_ch = my_num_ch;
nam_ch = my_nam_ch;
num_se = my_num_se;
nam_se = my_nam_se;
num_ss = my_num_ss;
nam_ss = my_nam_ss;
page = my_page;
sheet = my_page;
pict = my_pict;
}
What is here wrong ?
Thanks for answers ?
best regards
electricprog
I have 2 things to twll you:
1) Please post questions concerning code in the https://sourceforge.net/forum/forum.php?forum_id=48211 forum
2) If you send me your entire code ( curtis8@hotmail.com ) I will have a better chance of finding your error. (Note: I will only fix your code, comment my fix, and send it back. I will in no way share it with others)
Curtis