Hello ;
I have problem can you help me ..
my project have function converts an integer to string
for example :
CS 201
this have two part :
first part an integer >> given automatically by system
second part a string>> insert by user
Iwant to conect between them in a string how??
see my code
PLZ help me :mrgreen:
I have problem can you help me ..
my project have function converts an integer to string
for example :
CS 201
this have two part :
first part an integer >> given automatically by system
second part a string>> insert by user
Iwant to conect between them in a string how??
see my code
PHP:
#include <iostream>
#include <string>
#include<sstream>
using namespace std;
#include "Course.h"
int Course :: courseid = 200;
Course :: Course (int C,string name2)
{
setno_of_credits(C);
setcourseName(name2);
courseid++;
}
void Course :: setno_of_credits(int C)
{
no_of_credits = C;
}
int Course :: getno_of_credits()
{
return no_of_credits;
}
void Course :: setcourseName(string name2)
{
courseName = name2;
}
string Course :: getcourseName()
{
return courseName;
}
string Course :: conection()
{
stringstream ss;
ss << courseid;
ss >> courseName;
cout<<courseName<<endl;
return courseName;
}
void Course:: print_infoCourse()
{
cout<<" The IdCourse is : "<<conection();
}
PLZ help me :mrgreen: