C++:Adding two numbers

Status
Not open for further replies.

Zeeshan Quireshi

C# Be Sharp !
Kenshin said:
Use dosbox i used to use dosbox to run TC,...it runs fine under dosbox....but i hate tc hehe.....now we r usin assembler and its turbo assembler and it looks same like tat TC... i hate everythin tat looks like tc...hehe
Biggest prob is that TC does not run fine under my PC in ANY way , that's y use Relo
 

Garbage

God of Mistakes...
Zeeshan Quireshi said:
But problem is tat it DOES NOT Support borland specific headers[ conio.h anyone ? ] which are taught in the ICSE n CBSE curriculum :)

Who says that ???

Infact take a look @ this code,

Code:
# include <iostream.h>
[COLOR=Red][B]# include <conio.h>[/B][/COLOR]

int main()
{
    int a,b;
    cout << "Enter 2 numbers : ";
     cin >> a >> b;
    
    cout << "Addition = " << a+b;
    
    getch();
}

This code is perfectly valid in Dec C++.
And if u can see, then I've included conio.h & used getch() from that lib.:D
 

Zeeshan Quireshi

C# Be Sharp !
well , it frankly wasn't valid the last time i used Dev C++(that was when v4 was launched i suppose)

anyways , use whatever u like , except TC that is ;)
 

Yamaraj

The Lord of Death
shirish_nagar said:
Who says that ???

Infact take a look @ this code,

Code:
# include <iostream.h>
[COLOR=Red][B]# include <conio.h>[/B][/COLOR]

int main()
{
    int a,b;
    cout << "Enter 2 numbers : ";
     cin >> a >> b;
    
    cout << "Addition = " << a+b;
    
    getch();
}

This code is perfectly valid in Dec C++.
And if u can see, then I've included conio.h & used getch() from that lib.:D
It does not conform to the ISO C++ standards, regardless of the fact that even GCC can compile this code. The C++ programming language has nothing to do with screen, keyboard input and other I/O hardware interfacing.
 

Sykora

I see right through you.
@shirish_nagar : That is definitely not valid code in dev c++. Dev c++ uses mingw compiler, which is based on gcc, and will choke on that code because it conforms to standards written in about 1995, and since then have become outdated. Even if it does work, you must have copied conio from a TC install to your dev include directory.

EDIT : Slightly late...
 

Garbage

God of Mistakes...
^^ nah....

I've just installed DevC++ on my machine & compiled this!
Though it gives warnings bcoz I've used "iostream.h" instead of "iostream". But it compiled & run.
 

g_goyal2000

Youngling
Zeeshan Quireshi said:
Turbo C++ does NOT run fine under Windows XP(which is what the majority uses)
Actually it does. It runs fine on all Windows w/o any service pack(s). I've run it successfully on Win 98, 98SE, 2000, ME, XP, 2003. I've been using it for more than 2 years & still do.
 

Garbage

God of Mistakes...
^^ yeh, just thing is that u don't have to INSTALL it, copy the TCC ot TC++ folder & navigate thru folder in command prompt.

Then it should work fine!!!
 

Zeeshan Quireshi

C# Be Sharp !
g_goyal2000 said:
Actually it does. It runs fine on all Windows w/o any service pack(s). I've run it successfully on Win 98, 98SE, 2000, ME, XP, 2003. I've been using it for more than 2 years & still do.
But it takes up 100% CPU time on my machine(n all other Win XP machines i've used)
 
Status
Not open for further replies.
Top Bottom