here I have a qustion, which says;
(((Write a course class which contains number of credits and a string id. In addition to the constructor, it should contain a print function)))
so,
I need a function that convert integer to string
coze I did answer but not copleted yet
for example:
((. For each course, the id and number of credits is stored. The id of the course is a single string composed of two parts: a two character code specifying the major (e.g. CS for Computer Science, MA for Mathematics, EC for economics.. etc) and a serial number, which, unlike the code, is generated by the system.))
my answer is:
Expand|Select|Wrap|Line Numbers
- claas course
- {
- static int serialID;
- int no_credits;
- string ID;
- public:
- course(string s, int no)
- {
- no_credits = no;
- ID = s + serialID (( Here's the problem))
- serialID++;
- }
please I need it in a hurry
thanx