How to Run Turbo C++ on Windows 11

Turbo C++ is a 1990s MS-DOS compiler, so it won’t run on Windows 11 by itself. To use it, install the free DOSBox emulator, put your Turbo C++ files in a folder such as C:\TC, mount that folder in DOSBox with mount c c:\tc, and start TC.EXE. If you only need to write and run C or C++ code, a modern free compiler from Microsoft or another vendor is easier and supports current C++ standards.

This guide covers Windows 11 on regular Intel and AMD PCs with DOSBox 0.74-3, the current release on dosbox.com. The same steps work on 64-bit Windows 10.

Why Turbo C++ Doesn’t Run on Windows 11

Turbo C++ is a 16-bit DOS program. Microsoft says 64-bit versions of Windows don’t support 16-bit programs, and Windows 11 only comes in 64-bit editions. The old DOS layer that let earlier 32-bit Windows run these programs (NTVDM) doesn’t exist on 64-bit Windows. If you double-click TC.EXE, Windows shows an error that the app can’t run on your PC.

DOSBox gets around this by acting like a small MS-DOS computer inside a window. Turbo C++ runs inside that window, and the programs it builds are DOS programs that also run only inside DOSBox.

Before You Start: Getting Turbo C++

Borland stopped selling Turbo C++ decades ago, and there’s no official download today. Copies you find online are posted by third parties, and some installer bundles add unrelated software. If your school or course provides a copy, use that one, and scan any file you get with Windows Security before you open it.

Unzip or copy the Turbo C++ files into C:\TC so the program file is at C:\TC\BIN\TC.EXE (or directly in C:\TC, depending on your copy). A short folder name without spaces is easiest to type in DOS.

Step 1: Install DOSBox

Download the Windows installer from the official DOSBox downloads page, run it, and open DOSBox from the Start menu. The installer is a 32-bit app, which 64-bit Windows 11 runs without any extra setup.

DOSBox 0.74-3 hasn’t been updated in years, but it still runs Turbo C++ well. Actively maintained forks such as DOSBox Staging and DOSBox-X use the same mount command if you already have one installed.

Step 2: Mount Your Turbo C++ Folder and Start It

Steps to run Turbo C++ in DOSBox on Windows 11
Mount C:\TC as drive C, then run TC.
  1. Open DOSBox. You’ll see a Z:> prompt.
  2. Type mount c c:\tc and press Enter. DOSBox replies that drive C is mounted as a local directory.
  3. Type c: and press Enter to switch to that drive.
  4. If TC.EXE is in a BIN folder, type cd bin and press Enter.
  5. Type tc and press Enter.
DOSBox window showing the mount c c:\tc command and drive C mounted as a local directory
Mount C:\TC as drive C, switch to it, and type tc.

The blue Turbo C++ editor opens inside the DOSBox window. Press Alt+Enter to switch between full screen and a window.

The DOSBox MOUNT page explains the command in more detail. MOUNT tells DOSBox to treat a real folder on your PC as a drive inside the emulator, and MOUNT -u C unmounts it.

Turbo C++ editor with its blue screen and menu bar running inside a DOSBox window
Turbo C++ opens in its blue editor screen inside DOSBox.

Step 3: Point Turbo C++ to Its Include and Library Folders

Because C:\TC on your PC is now drive C inside DOSBox, the folder Turbo C++ calls C:\TC\INCLUDE is really C:\INCLUDE. Many copies are set up for the longer path, which causes an “Unable to open include file” error on the first compile. Fix it once:

  1. In Turbo C++, open the Options menu and choose Directories.
  2. Set Include Directories to C:\INCLUDE.
  3. Set Library Directories to C:\LIB.
Turbo C++ Directories dialog with include and library folders set
In Options → Directories, use C:\INCLUDE and C:\LIB when C:\TC is mounted as drive C in DOSBox, then choose OK. This recreated example leaves Output Directory blank.
  1. Choose OK. Then open Options again and choose Save so the setting sticks.

If your copy keeps everything in C:\TC without INCLUDE and LIB folders, check where the .H files actually are and use that path.

Step 4: Write, Compile and Run a Program

  1. Open File and choose New. An empty editor window opens.
  2. Type a short test program, such as one that prints Hello.
  3. Press F2 and save it with a short name, like HELLO.CPP. DOS file names can be at most eight characters before the dot.
  4. Press Alt+F9 to compile. A box shows any warnings or errors.
Turbo C++ compile box showing zero warnings and errors for HELLO.CPP
A successful compile shows zero warnings and errors and Success: Press any key. This recreated HELLO.CPP result uses illustrative line and memory totals.
  1. Open the Run menu and choose Run. The program runs, and Turbo C++ returns to the editor when it finishes.
  2. Press Alt+F5 to see the output screen, then press any key to go back.
Turbo C++ output screen showing the Hello test program result
Press Alt+F5 to view the program output. This recreation shows Hello from the sample program; press any key to return to the editor.

Warning: Turbo C++ uses Ctrl+F9 as its Run shortcut, but the DOSBox special keys list assigns Ctrl+F9 to closing DOSBox. Pressing it shuts the emulator without saving your file. Use the Run menu instead, or press Ctrl+F1 to open the DOSBox keymapper and change that key.

Step 5: Make DOSBox Remember Your Setup

DOSBox tips for running Turbo C++
Auto-mount your folder and adjust speed with DOSBox shortcuts.
DOSBox config file autoexec section with mount and Turbo C++ start commands
Add these startup lines under [autoexec] in dosbox-0.74-3.conf. This recreated Notepad excerpt assumes TC.EXE is in the BIN folder; the pictured text has not been run.

Typing the mount command every time gets old. The DOSBox wiki’s basic setup guide explains that the [autoexec] section of the configuration file runs commands automatically at startup. The dosbox.conf page says that on current Windows the file sits in your user folder under AppData\Local\DOSBox and is named for the version, such as dosbox-0.74-3.conf. You can also open it from the DOSBox folder in the Start menu with the Options shortcut.

Open the file in Notepad, scroll to the very end, and add these lines under [autoexec]:

  • MOUNT C C:\TC
  • C:
  • CD BIN (if your TC.EXE is in BIN)
  • TC

Save the file. DOSBox mounts your folder and launches Turbo C++ every time you open it.

Troubleshooting

  • The editor is slow or too fast. Press Ctrl+F12 to speed DOSBox up or Ctrl+F11 to slow it down. Ctrl+F7 and Ctrl+F8 decrease or increase frameskip.
  • Files you changed in Windows don’t show up. A mounted drive doesn’t refresh on its own. Press Ctrl+F4 to refresh it, or restart DOSBox.
  • The mouse is stuck in the window. Press Ctrl+F10 to capture or release it.
  • “Unable to open include file.” Recheck the folders in Step 3. The paths must match drive C inside DOSBox, not your Windows path.
  • “Illegal command: tc.” You’re in the wrong folder. Type dir to list the files, then cd bin if TC.EXE is inside BIN.

Why You May Want a Modern Compiler Instead

  • Turbo C++ uses old headers like iostream.h and conio.h that modern C++ doesn’t use. Current compilers expect #include lines such as iostream without the .h and the std:: prefix.
  • It can’t compile code written for current C++ standards, so examples from newer books and websites may fail.
  • Programs it builds are DOS programs that run inside DOSBox, not regular Windows apps.

These free tools run natively on Windows 11:

Tool Best for How to get the compiler
Visual Studio Community A full IDE with a debugger In the installer, select the Desktop development with C++ workload
MSYS2 The GCC compiler (MinGW-w64) from a terminal In the UCRT64 terminal, run pacman -S mingw-w64-ucrt-x86_64-gcc, then check it with gcc –version
Code::Blocks A lightweight IDE with GCC included Choose the installer with mingw in its name

Microsoft’s C++ installation guide walks through the Visual Studio installer. Visual Studio Community is free for individual developers, students and classroom use. Embarcadero’s free Dev-C++ is another native IDE that uses GCC.

If your course requires Turbo C++, keep DOSBox for class work and use a modern compiler for everything else. If you’re learning another language, you can also install Python on Windows 11 or install Java on Windows 11.

Frequently Asked Questions

Is Turbo C++ free?

There’s no official free release, and no company sells or supports it today. Copies online are unofficial. For a free, supported tool, use Visual Studio Community, MSYS2 or Code::Blocks.

Can I run TC.EXE by double-clicking it in Windows 11?

No. Windows 11 can’t run 16-bit DOS programs directly, which is why you need DOSBox.

Can I drag TC.EXE onto DOSBox instead?

The DOSBox wiki says Windows users can drag a DOS program’s EXE onto the DOSBox program or its shortcut to start it. For Turbo C++, mounting the whole folder is usually more reliable, since the program also needs its include and library files.

Will a Turbo C++ installer from a download site work?

Some third-party packages bundle Turbo C++ with DOSBox, but they aren’t from Borland or the DOSBox team, and you can’t check what else they install. Setting up DOSBox yourself takes a few minutes and keeps you in control of what runs on your PC.

Related Guides