As we know Borland Turbo C++ doesn’t work on Windows 7 Therefore we have to use Visual C++ 2010 Express edition. Details on how to write, compile and run a program on Visual C++ is given on this site.. You can find it on this link.
Now there are some difference in program code written in Visual C++
1. Use system(“cls”) in place of clrscr() and include stdlib.h file in your program
2. If you are writing your program in C++, then here is a “Hello World” program, you can find out difference yourself
#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
system(“cls”);
cout<<”Hello World…”;
getch();
}
system(“cls”);
cout<<”Hello World…”;
getch();
}
Instead of iostream.h simple iostream is used and an extra line using namespace std is added.
Visual C++ is easy to use and with just a little practice you will get used to it.
No comments:
Post a Comment