Discussion Overview
The discussion revolves around identifying the correct header file to include for using CString in Visual C++. Participants explore various header files and their implications, including issues related to compiler errors and project configurations.
Discussion Character
- Technical explanation
- Debate/contested
- Homework-related
Main Points Raised
- One participant inquires about the header file needed for CString, mentioning difficulties in finding the correct one.
- Another participant asserts that CString is defined in afx.h and suggests avoiding windows.h when including MFC headers.
- A participant shares their ongoing errors after including afx.h and requests clarification on the errors they are encountering.
- There is a suggestion to post the actual source code to better diagnose the issue.
- A participant provides their code, which includes the use of CString and various networking functions.
- Another participant requests the full set of #include lines to check for header inclusion order issues.
- A participant references an external forum discussion that suggests stdafx.h may not support MFC unless configured properly, raising questions about its content.
- One participant speculates about including String.h, questioning if it would suffice for CString.
- A participant clarifies that CString is not in String.h and emphasizes the importance of stdafx.h for MFC support.
- Another participant confirms that CString is defined in AFX.h and notes a reduction in errors after including it.
- A participant mentions importing atlstr.h, resulting in fewer errors and expresses optimism about resolving remaining issues.
- Finally, one participant announces that the problem is solved and thanks others for their assistance.
Areas of Agreement / Disagreement
Participants express differing views on the correct header file for CString, with some asserting it is afx.h while others suggest alternatives. The discussion remains unresolved regarding the best approach to include the necessary headers without causing errors.
Contextual Notes
There are indications of potential issues with header file inclusion order and project configuration, particularly concerning MFC support in stdafx.h. Some participants express uncertainty about the implications of including certain headers.