By default, when you create a relationship between two
C/C++ classes in projects in your workspace, an #include directive
statement is generated with a relative path to the header file of
the target class. However, you can set a preference to suppress the
path to the header file so that only the header file name appears
in the #include statement. These settings affect only new relationships
that you create and do not affect any existing relationships.
About this task
To include only the header file name in the #include statement
for a relationship, complete the following steps:
Procedure
- Click .
- In the Preferences window, expand Modeling and
click C/C++ Modeling.
- On the C/C++ Modeling page, under C/C++
Include directive properties, select one or both of these
options:
- Suppress include directive for classes from same
project in workspace
- Suppress include directive for classes from other
projects in workspace
- Click OK.
What to do next
Tip: You can also modify #include directive statements
in the Properties view.