Turbo C/C++ and other junk compilers help, discussions and queries here

nbaztec

Master KOD3R
Re: Turbo C/C++ and other junk compilers discussions here

I wish the Indian educational institutes can stop sucking on the tit of "I-only-know-this" mentality.

Apart from the conventional "sane" alternatives:
- MingW/GCC
- Code::Blocks (nice)
- Dev C++
- Microsoft Visual C++ Express (Heck, even M$ is doing their bit for the society).

There are other things:
- Emulate 16-bit working environment using DosBOX
- Emulate Virtual Machine. Some freewares are available. (My pref). VirtualBox. VMPlayer, etc.

If you're hell bent upon using the sundial to know the time and/or helpless 'coz Teh Old Folks think you're too small to outsmart them, here are my 2 cents:

- Full Screen for TC
- If you're too lazy to even bother with DosBox, here's a one-stop-single-click app. Just give path to TC and click. (Set directories within TC as: "INCLUDE" & "LIB", no paths)

P.S. Someone mentioned Yashwant Kanetkar, it's a sh!tty book with no regard to ANSI standards. It's a sad sad thing universities actually recommend this piece of crap.
 

tuxybuzz

Ballack Junior
Re: Turbo C/C++ and other junk compilers discussions here

I really hate it when Turbo is referred to as C++..lol.
Most students don't even know that Turbo is not the goddamn language. Thankfully my lab has a linux box with gcc. :D
 

achuthan1988

Broken In
Re: C/C++ Beginner's Guide and Post Basic Questions here

i installed DOSBOX 0.74 and turbo c++ in the directory c:\TC
But the BIN,INCLUDE and LIB folders are in a TC folder inside c:\TC
so when i launched tc++ with DOSBOX it showed invalid directory.So i changed the directory to C:\TC\TC\INCLUDE and C:\TC\TC\LIB.But still when i compile it shows iostream.h not found and so on...
 

thetechfreak

Legend Never Ends
Re: C/C++ Beginner's Guide and Post Basic Questions here

I think you should keep that directory empty. Even I got this error at my school sometimes.
 

nims11

BIOS Terminator
Re: Turbo C/C++ and other junk compilers discussions here

after opening turboC++, goto options->directories and enter the path to the different directories there.
 

nbaztec

Master KOD3R
Re: Turbo C/C++ and other junk compilers discussions here

Try the one-click app, mentioned in my post.
 

sanjeeb_san

Right off the assembly line
Re: C/C++ Beginner's Guide and Post Basic Questions here

:?:
Hi guys , i m a beginner in c++ , i was trying to create a simple program that prints any random line for infinity times without interruption .. but it has to abort if the user wants ,say ( he can press any key to abort).

I tried the program like this

for(;;)
{
cout<<"hello";
cin>>ch;
if(ch=='y')break;
}




i encounter a problem that the program was stopping to take an i/p every time it get into the loop.... that is undesireable .....
plz help me out to solve this problem....

I would expect that i would get solution very soon
 

Vyom

The Power of x480
Staff member
Admin
Re: C/C++ Beginner's Guide and Post Basic Questions here

^ First of all, welcome to TDF. :-D

Well, you can use kbhit() function to interrupt an infinite loop.
But since the mentioned function use conio.h, I must give you a Non Portable Code warning.

It goes like this,

WARNING: NON-PORTABLE CODE
Code:
    while(1)
    {
        if (kbhit())
                break;
        cout << "\nHello.";
    }
 
Last edited:

aurora

Right off the assembly line
c++ graphics help

hello guys can any one help me with this problem i am having implemnting graphics in borland c++ version 5.02?(it's outdated but that's what cbse in it's unparalleld wisdom allows us to use). my problem is :- after carefully setting all the necessary prerequisites and including graphics.h(BGI graphics, DOS standard)when i try to compile the prog. it gives the error "not enough parameters to call initgraph with" whenever the first parameter in initgraph() is set to autodetect.when i try to do it by setting all parameters by hand, all i get is a flashing screen after which the program terminates. PLEASE HELP.
 

nims11

BIOS Terminator
Re: c++ graphics help

try this
Code:
int gd=DETECT, gm;

initgraph(&gd, &gm, "c:\\turboc3\\bgi " );
change the third argument according to your compiler path
 

aurora

Right off the assembly line
Re: c++ graphics help

hello nims11 i tried what you suggested. the same problem persists, with the exception that the flashing console now shows this :-bgi error graphics not initialized use initgraph. wh:neutral:at do i do?
 

thetechfreak

Legend Never Ends
Re: C/C++ Beginner's Guide and Post Basic Questions here

guys need help with a c++ program

I need to add a statement "DO u want to continue, Y or N" after each page is completed. its a school project

tHIS IS the file link

Just a dummy file for project. No real functionality. need to submit tommorow.
 

Neuron

Electronic.
Re: C/C++ Beginner's Guide and Post Basic Questions here

Add a boolean variable.Put all those choice selection statements in a while loop which runs as long as the bool flag is set.Reset the bool variable when the user answers no.
 

thetechfreak

Legend Never Ends
Re: C/C++ Beginner's Guide and Post Basic Questions here

Book isnt helping. Program isnt helping. Pls upload or copy paste the complete code. will be thankfull :)
 

nims11

BIOS Terminator
Re: C/C++ Beginner's Guide and Post Basic Questions here

guys need help with a c++ program

I need to add a statement "DO u want to continue, Y or N" after each page is completed. its a school project

tHIS IS the file link

Just a dummy file for project. No real functionality. need to submit tommorow.

Didnt get you problem.
Code:
do{
//.......
ch=getchar();
}while(ch=='y');
 

Vyom

The Power of x480
Staff member
Admin
Re: C/C++ Beginner's Guide and Post Basic Questions here

guys need help with a c++ program

I need to add a statement "DO u want to continue, Y or N" after each page is completed. its a school project

tHIS IS the file link

Just a dummy file for project. No real functionality. need to submit tommorow.

I have added a loop to repeat the content of main function. And put an extra option in the menu to Exit.
This is not asking Y/N since, now the user can exit when he wants to if he enters 0.

I hope this solves your problem.

PS: This code is Non-ANSI Compliant! Using which equates to 100 years of time in TDF Jail! You have been warned!

File: KARAN.CPP
 

thetechfreak

Legend Never Ends
Re: Turbo C/C++ and other junk compilers discussions here

@Vineet369 Thanks x10000000 :D
Absolutely amazing. Thanks a lot!!
 

nims11

BIOS Terminator
Re: Turbo C/C++ and other junk compilers discussions here

coz it is for our great Blue screened compiler.
 
Top Bottom