confusion about class header, implementations names

Hi everyone!
I'm using Code Block IDE and totally confused with the names of files when a new class is created.
Usually, when we add a class, the Code Block will create two files, the .h and .cpp. So we'll have the following names:
1. name1 of the header *.h
2. name2 of the implementation file *.cpp
3. name3 after #IFNDEF *_H in the header
4. name4 of the class defined in header and cpp, i.e. class ...{}

my questions are:
1. the name1 has to be identical to name2?
2. the name1 has to be identical to name3?
3. the name3 has to be identical to name4?

Thanks a lot!!!
None of those four names have to be identical to any other names.

Your IDE and various other tools might be expecting certain naming conventions, but C++ doesn't insist those names all be the same.
@Repeater Thanks u!
Are your sure that the #IFNDEF name3_H will not have any conflict with class name ou cpp name?
Sorry for reconfirming.
Yes, that's correct. There is absolutely nothing that has to correct the name of the symbol used for the multiple inclusion guard with the name of anything actually defined in the header file.

Do you understand what that guard is doing?
Topic archived. No new replies allowed.