How do you code this code in c++?
public bool returnboolean(bool x)
{ return x; }
public double sum(double one, double two)
{ return one+two; }
public string yourname(string name)
{ return "hello "+yourname; }
Where do i go to write code? in *.h? or in *.cpp?
What is their goals of those 2 classes? Because then I added a class they 2 clases are created.
How do you create an instance?
For example in c#:
person p1 = new person();
What is the equivalent of this in c++??
1 Answer