Using a class!!!
-
I have created a class now and want to test it. But the compiler says: fatal error C1010: unexpected end of file while looking for precompiled header directive In the .cpp file for my class I have in the beginning of the file #include "MyHeaderFile.h" and what can be wrong!? Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
-
I have created a class now and want to test it. But the compiler says: fatal error C1010: unexpected end of file while looking for precompiled header directive In the .cpp file for my class I have in the beginning of the file #include "MyHeaderFile.h" and what can be wrong!? Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
Typically in MFC Apps you have a "stdafx.h" header file which is used as the precompiled header. Then in Project|Settings |C/C++ |Precompiled Headers you set "Use precompiled header file (.pch)" - "Through header: stdafx" If you aren't using precompiled headers then set "Not using precompiled headers" instead. See the VC++ Help for info on precompiled headers. Neville Franks, Author of ED for Windows. www.getsoft.com
-
I have created a class now and want to test it. But the compiler says: fatal error C1010: unexpected end of file while looking for precompiled header directive In the .cpp file for my class I have in the beginning of the file #include "MyHeaderFile.h" and what can be wrong!? Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
This is answered in the VC forum FAQ. --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm
-
I have created a class now and want to test it. But the compiler says: fatal error C1010: unexpected end of file while looking for precompiled header directive In the .cpp file for my class I have in the beginning of the file #include "MyHeaderFile.h" and what can be wrong!? Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
-
How exactly did you create a class? A safe way of doing that is to create a simple AppWizard project and use Class Wizard to create a generic class. Thus Class Wizard will generate the headers so that you'll only need to add your code.
Well I opened Notepad and wrote it by my own! :) Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
-
Typically in MFC Apps you have a "stdafx.h" header file which is used as the precompiled header. Then in Project|Settings |C/C++ |Precompiled Headers you set "Use precompiled header file (.pch)" - "Through header: stdafx" If you aren't using precompiled headers then set "Not using precompiled headers" instead. See the VC++ Help for info on precompiled headers. Neville Franks, Author of ED for Windows. www.getsoft.com
I will try that out! Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!
-
Well I opened Notepad and wrote it by my own! :) Rickard Andersson@Suza Computing C# and C++ programmer from SWEDEN! UIN: 50302279 E-Mail: nikado@pc.nu Speciality: I love C#, ASP.NET and C++!