| | |
class code
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
how can I check the donor if valid by using switch
function Is_BloodBroup_Valid // takes a string as parameter and return true if it is a valid
group and false if not. The only possible blood groups are A+, A-, B+, B-, 0+, 0-,
AB+, AB-.
also if I have a Constructor function with default values and one of the parameters was of struct type how I can assign value to it , like this
1. Constructor function with default values IdNumber = 0, name = "", bloodGroup = "",
home_Phone="", mobile_Phone="", address={0,0,0,"",""} An overloaded constructor that takes the same parameters of the constructor in except
Address for the address
this was my try
there are some errors.
function Is_BloodBroup_Valid // takes a string as parameter and return true if it is a valid
group and false if not. The only possible blood groups are A+, A-, B+, B-, 0+, 0-,
AB+, AB-.
also if I have a Constructor function with default values and one of the parameters was of struct type how I can assign value to it , like this
1. Constructor function with default values IdNumber = 0, name = "", bloodGroup = "",
home_Phone="", mobile_Phone="", address={0,0,0,"",""} An overloaded constructor that takes the same parameters of the constructor in except
Address for the address
this was my try
C++ Syntax (Toggle Plain Text)
struct Address { int house ,road ,block; string city,country; }add; BloodDonor(int =0,string =" ",string =" ",string =" ",int add.house=0,int add.road=0,);
there are always hope
![]() |
Other Threads in the C++ Forum
- Previous Thread: msvc linking codes
- Next Thread: i need help with my output.
Views: 421 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll dynamic encryption error file forms fstream function functions game givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort stream string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






