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??

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)

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.