I have defined a class called Exception as follows:
#include <iostream>
#include <string>
class Exception{
string s;
public:
Exception(string error): s(error){};
friend...
Type: Posts; User: grimjb
I have defined a class called Exception as follows:
#include <iostream>
#include <string>
class Exception{
string s;
public:
Exception(string error): s(error){};
friend...
Thanks everyone for giving a C++ newbie a hand. This is a great forum! you guys rock.
you could have info return the value you want to use outside the function. For example:
int info ()
{
do all this stuff which includes int a;
}
int main()
{
int a;
ok my new method looks like this:
PolyLine(const PolyLine* &src)
{ //cout << "inside deep copy\n";
int i;
double x1, x2;
xArray = new double[src->length];
yArray = new...
I am writing this as part of an assignment and the assignment says that the method should be called using the following statement:
PolyLine p2 (p1);
I think I have to change my method signature...
I tried to print the PolyLine after the new and improved destructor and I can honestly say that I've never been to happy to see a segmentation fault =)
Could you guys answer another question for...
I have a class named PolyLine with the following data members:
double *xArray;
double *yArray;
int length;
I have a destructor:
~PolyLine()
{