0

Hi guys,

I am programming in C++ with NetBeans. It works fine when I playing with just one main.cpp file. But After I added an additianal class (1 .cpp and 1 .h), it makes an error even though I do not make any changes in the new files. (all I did is Right clicking on the project name and "new > C++ class")
Error message:
Signal received: SIGSEGV (Segmentation fault)

newClass.cpp
'#include "newClass.h"

newClass::newClass() {
}

newClass::newClass(const newClass& orig) {
}

newClass::~newClass() {
}
'

newClass.h
'#ifndef NEWCLASS_H

define NEWCLASS_H

class newClass {
public:
newClass();
newClass(const newClass& orig);
virtual ~newClass();
private:

};

endif /* NEWCLASS_H */'

"clean and build" does not solve this problem..

What is wrong with this??

3
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by FelineHazard
0

Show us main.cpp, it may help. Also use code indentation correctly (note: before leaving the 4 spaces you have to leave a new line)

0

Also, you may want to use the c++ code marker. Just follow the "Formatting Help" link just above the reply box (from the right). Makes the code all more readable.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.