Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

CString and Link Errors

Posted on 1998-04-12
5
Medium Priority
?
203 Views
Last Modified: 2010-04-10
I asked why I got all those error. This is not a question but the answer for the experts who tried to help.  I appreciate that.The real problem was that the code was sent to me by someone using an newer compiler and he used the header stdafx.h. That is not where CString is defined in VC 4.0. It is in afx.h..... I got a compile and run after that simple change....
0
Comment
Question by:Cyberdater
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 

Author Comment

by:Cyberdater
ID: 1184226
Edited text of question
0
 
LVL 22

Expert Comment

by:nietod
ID: 1184227
Thanks for letting us know.
0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 0 total points
ID: 1184228
Your stdafx.h should INCLUDE afx.h anyway.

Try creating a new project with AppZiard and get the stdafx.h from that.

0
 

Author Comment

by:Cyberdater
ID: 1184229
I generated both an Application and Console workspace before and after I inserted the .cpp.  Also if I include stdafx.h as well as afx.h I get into errors.  I read the stdafx.h and it does contain afx.h in the core headers.  Something really odd to me is that stdafx.h is located in mfcdevstd\mfc\src instead of mfcdevstd\mfc\include and the applications cannnot find it until I put the src into the include paths under options..directory.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1184230
you should have your own stdafx.h (make a copy of the one in MFC source or use the one AppWizard writes for you).  Don't directly refer to the one in MFC source area.

do NOT put any code or preprocessor statments before #include "stdafx.h" as any lines there are ignored when precompiled headers are used.

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question