You are here:

C++/Got a fatal error when trying to write a program in turbo C++3.0

Advertisement


Question
Hello Sean,
I hope you can help me out. I am doing an exercise in turbo C++ and I got an error reading "fatal...includeIOSTREAM.H: Error directive: Must use C++ for the type iostream."
I basically have "#include <iostream.h> as part of my directives so I can use "cout" and so on. How do I fix this error message, I never got this in any of the other assignments I have been doing. I am also a beginner in all of this. Thanks.
Aliya

Answer
Hi Aliya,

Is it possible that you accidentally named your source file with a .c extension, rather than a .cpp? I'm not familiar with the Turbo C++ environment, but based on that error, that's the most likely culprit. If that isn't the case, copy and paste your source, and I'll be happy to go through it for you and look for errors.

I really hope that helps,

Sean

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Sean Wcisel

Expertise

I can answer most beginner and intermediate level questions. My strengths are various algorithms and data manipulation. My background might be best suited to anything from basic CPP and file I/O, to algorithms involving recursion, hashing, binary search trees, and so on. I've done some tutoring in my free time, both online and in person. I also have quite a bit of debugging experience. I have some experience with game code, specifically using D3D based game engines. I only speak English, but I believe I do so very well :). I'm completely unable to answer questions about coding drivers for hardware, and many library specific issues.

Experience

I've studied CPP for roughly four years now, with a combined eight years of object oriented programming experience. I have worked professionally in the field for about a year. I have also had some tutoring experience in CPP and C#

Organizations
IEEE, Western Michigan University Computer Club

Education/Credentials
Western Michigan University

©2016 About.com. All rights reserved.