karpay
January 16th, 2011, 06:52 PM
Hi all!
I'm trying to debug a program which has 3 files.
There is one .h file, one .cc file and one main file.
Suppose the code is as follows:
//class1.h
#include "class1.h"
#include <stdio>
#include <iostream>
using namespace std;
class class1
{
class1();
function1();
};
//class1.cc
#include "class1.h"
#include <stdio>
#include <iostream>
using namespace std;
class1::class1()
{
}
class1::function1()
{
cout << "this is class one"<< endl;
}
//the main code
//main.cc
include "class1.h"
int main(int argc, char* argv[])
{
class1 *obj1 = new class1();
obj1->function1();
}
What I'm asking is how can I put a break point in the line
cout << "this is class one"<< endl;
in class1.cc. (please, check the red line above)
Any kind of help is kindly appreciated.
Regards.
I'm trying to debug a program which has 3 files.
There is one .h file, one .cc file and one main file.
Suppose the code is as follows:
//class1.h
#include "class1.h"
#include <stdio>
#include <iostream>
using namespace std;
class class1
{
class1();
function1();
};
//class1.cc
#include "class1.h"
#include <stdio>
#include <iostream>
using namespace std;
class1::class1()
{
}
class1::function1()
{
cout << "this is class one"<< endl;
}
//the main code
//main.cc
include "class1.h"
int main(int argc, char* argv[])
{
class1 *obj1 = new class1();
obj1->function1();
}
What I'm asking is how can I put a break point in the line
cout << "this is class one"<< endl;
in class1.cc. (please, check the red line above)
Any kind of help is kindly appreciated.
Regards.