0

I have copied header and cpp file from one project to another. I need to change the file names now. The header file has the following code that I don't understand. If I change the file name, how should I change this code? Thanks for helping.

#if !defined(AFX_MSELCFLCOMPDLG_H__8687FD1A_777D_4967_A331_42C8536DE2DE__INCLUDED_)
#define AFX_MSELCFLCOMPDLG_H__8687FD1A_777D_4967_A331_42C8536DE2DE__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif
Fraser
  • 74,704
  • 20
  • 238
  • 215
user1783998
  • 167
  • 1
  • 1
  • 9

2 Answers2

0

You don't need to, but you probably should.

This code is there as a header guard. It stops the contents from being included multiple times into a single source file.

Changing it is a matter of maintenance and good practice.

dma
  • 1,758
  • 10
  • 25
0

That is called an include guard and it prevents the file from being included more than once. You don't need to change it if you change the filename. The long string of digits following the name will be unique enough. If you want to keep the name and the constant in sync change the "MSELCFLCOMPDLG_H" portion to whatever you new file name is.

Jason
  • 1,612
  • 16
  • 23