Subscribe me on YouTube

Wednesday, December 31, 2014

iostream.h Header File Not Supporting in Dev C++ Windows 64bit x64 [solved]_How To Do C++ Programming in Dev C++

Hi Friends, I'm Sujoy from India. And I'm back with another technology article for you. 
Today I'll tell you about how to do C programming and C++ programming on your Windows x64 PC or laptop. Lots of users ask me what is the best C++ compiler and IDE for Windows 8 64bit and Windows 7 64bit computer/laptop/pc? We all loved the Borland Turbo C++ IDE on our older 32bit Pentium or Celeron PCs/laptops running Windows XP; and many of us learned programming using the Borland Turbo C++. But Borland Turbo C++ is not officially available for 64bit versions of Windows 7 or Windows 8. However you can run older Borland Turbo C++ v3.0 using DOSBox on Windows 7 and 8.

But the problem is, the compiler itself is 16 bit, which runs virtually under DOSBox. And being a 16bit compiler, after compiling a program, the executable file which it produces (Windows .exe file) is itself 16bit. So you can't run the .exe file individually as standalone executable file on Windows 64bit computer. You've to generate the .exe file by compiling the original .cpp source-code every time from inside the DOSBox Turbo C++ to run them. And if you want to distribute your programs to your friend/colleague, he/she has to do the same in order to run them if they are on a 64bit machine.

Also the older Borland Turbo C++ v3.0 provides you with an older no graphical type of interface. Where everything runs slow and copy-pasting is difficult and managing large source-codes are tough. And you can't have a program name more than 8 characters!

So, as you can see, this solution is not optimal. So we've to move to a modern Compiler & IDE. And you can make 64bit codes supporting dynamic programming which can use all the capabilities of your modern 64bit processor. I'd suggest using Dev C++.  In that you can choose compiler version- 32bit or 64bit.
But there’s one problem with Dev C++.  That I'll tell you how to solve.

Problem Description:
In older Borland Turbo C++ IDE, we could directly write a simple 'Hello World' C++ program like below-

#include<iostream.h>
#include<conio.h>
int main()
{
cout<<"Hello World";
getch();
return 0;
}

But when I tried the same code in Dev C++, I got the following error- 1  21           C:\Users\Sujoy Krishna Das\Documents\Dev C++\Hello World.cpp [Error] iostream.h: No such file or directory  - compilation terminated.



The problem seems with the iostream.h header file, Dev C++ can't recognize it. And without the iostream.h header file, we can't do C++ programming. How did I fix it? Read below.

Problem Solution-
You need to do little modification in the code to run it on Dev C++. I used the Dev C++ v5.8.3. The updated code is below.

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
cout<<"Hello World";
getch();
return 0;
}

And it ran successfully!



Explanation-
What changes did I do? Dev C++ supports newer ANSI C++.  That has gone through many changes. In older style compiler IDE like Borland Turbo C++, you could use the <iostream.h> header file, now you've to use the ANSI C++ version-  <iostream> only. And another is using namespace std; . Where using & namespace are the two keywords of ANSI C++ and std is the namespace where ANSI C++ standard class libraries are defined.

In short, you have to write #include<iostream> and using namespace std; at the beginning of every program in Dev C++. That's it! Now you can make programs of your choice! I hope you've liked my article!

ONE ANNOUNCEMENT!
====================
I'm a YouTube Partner from India. I've uploaded videos on Statistics,Numerical Methods,

And a series of videos showing how to use your scientific calculators Casio fx-991ES & fx-82MS to do maths easily.

Click my YouTube channel's link below to watch them.
Subscribe to my youtube channel below-

 http://www.youtube.com/sujoyn70

Please 'SUBSCRIBE' to my YouTube channel to get updates about my latest video uploads!

Incoming tags-
#include<iostream.h> not supported in Dev C++ ,how to do C++ programming in Dev C++, <iostream.h> header file giving error in Dev C++, no such directory or file error in Dev C++ help, solution of Dec C++ problem, how to make 64bit programs, how to make multithreading programs, which is the best compiler for Windows 8.1 64bit, best 64bit compiler, how to run Turbo C++ on Windows 8 64bit x64 processor, best compiler for Windows 7 64bit, Object Oriented Programming with C++ E Balagurusamy pdf ebook download, programming in ANSI C++. Let Us C by Yashwant Kanetkar pdf ebook download, Let Us C++ by Yashwant Kanetkar pdf ebook download, cpp to exe file conversion, how to compile C program from command line, C programming in windows cmd, how to pass run time arguments in C ++, Java the complete reference by herbert schildt, command line programming, Object Oriented Programming Systems OOPS, OOPS using C++, download blueJ full version, how to do java programming in windows command line, assembly programming in windows cmd, batch file programming in windows command line, command line tricks, command prompt hacking, learn computer hacking, hwo to hack a LAN pc, how to hack a cisco router, how to configure cisco router, how to configure a juniper firewall, how to program a calculator, configuring a cisco ASA firewall,

8 comments:

  1. Muy Bueno.
    Ejemplos: http://tupagina.comuf.com/

    ReplyDelete
  2. Hello Everybody,
    My name is Mrs Sharon Sim. I live in singapore and i am a happy woman today? and i told my self that any lender that rescue my family from our poor situation, i will refer any person that is looking for loan to him, he gave me happiness to me and my family, i was in need of a loan of S$250,000.00 to start my life all over as i am a single mother with 3 kids I met this honest and GOD fearing man loan lender that help me with a loan of S$250,000.00 SG. Dollar, he is a GOD fearing man, if you are in need of loan and you will pay back the loan please contact him tell him that is Mrs Sharon, that refer you to him. contact Dr Purva Pius,via email:(urgentloan22@gmail.com) +918376918351 Thank you.

    ReplyDelete
  3. This post is really informative and people should have got a lot of

    benefits after reading this post. We all agree that now induction

    cooktops have become the necessity in every household. So if you are

    confused on which induction cooktop you should buy just checkout Our best induction cooker

    ReplyDelete
  4. https://www.google.com.et/url?q=https://superiortopics.com

    ReplyDelete
  5. Thanks For Sharing This usefull Imformation Techdhyan Nice Post

    ReplyDelete