I'm having problems opening directly TurboC++ compiler(dos version) on Windows X.
if I click on the TurboC++ icon through windows GUI it opens for a sec(a blank dos screen)
and shuts down.
so i have to access it through the command line i.e.,
cmd (enter)
c:\tc\bin (enter)
tc.exe
This way TurboC++ opens and I'm able to program and everything..
Why do I have to always start tc.exe through the command line? Why can't I start it through Windows XP?
Also, after starting tc.exe through the command line, I am unable to execute any graphics program through it.
I write a simple code for creating a circle using predefined functions..
when i compile and run the program tc.exe exits and returns back to the command prompt.
Why does this happen?Is there a solution?
I have also tried using DosBox to run TurboC++. it closes on executing the graphics program.
ps: this problem has occurred to only me and my friend.....
all PCs in our college have Windows XP or Vista installed and they have no problems.
im using initgraph(); function for initialising graphics drivers(using autodetect) and graphic mode.i have given the proper address for bgi files. and the folder contains the file required (EGAVGA.bgi). this program works fine in our college.does this have something to do about my graphics card(nvidia 9400 1gb)?
Graphics in the 80s were a completely different world than today - directly accessing hardware, often using undocumented features to optimize performance. Drivers didn't exist in DOS. Each program had to write their own hardware layer (hence why under DOS, you had to configure the video and soundcard for every single game separately. The fact that we can run any software from the 80s is a testament to the backwards compatibility work done by Microsoft.
You might have some luck running it on VirtualPC, VMWare or VirtualBox. All of them offer a free version, and if you can find and old copy of DOS 6.22 lying around, you might be good to go. Otherwise, you'll likely be stuck finding a physical 486 running Windows 3.11, and working on that. Depending on what deals your college has with Microsoft, they should be able to get a copy of DOS 6.22 for free - it's still offered for download on MSDN. Although, if you're still using TurboC++, they have not likely signed up for anything with MS. You can also try FreeDOS.
Right click on the TC icon and pick Properties. Go to the Compatibility tab. Play with the settings found there. If that doesn't help, ask your teacher how to use a 25 year old program on a modern computer.
How are you doing graphics? If you're using int 10h (or equivalent) to change the mode, that should work fine as it stands. If you're using BGI, make sure the program's working folder contains the BGI files that come with Turbo C++ -- for more details on initializing BGI, look up initgraph in the help.
Even modern PCs with modern graphics cards seem to have enough legacy support for the BGI code to work, though it seems like the program always runs fullscreen once in graphics mode, rather than in a window.
I don't know why Turbo C++ might not start from the GUI unfortunately. I've used Borland C++ just now to refresh my memory about the BGI stuff, and it worked OK.
Use visualc++ express instead. Its free and equipped with c++11.
for opening problem you can use a .bat file for opening Turbo C++
as follows:
open notepad and type the address of TC.exe and name of exe file like
D:\bhanu\TurboC++\TC.exe
and save it as TC.bat instead of TC.txt
and now double click it to run TC.
For graphics you first copy EGAVGA.BGI file from bgi folder to bin and then in the Turbo c++ open options->linker->library
and mark 'X' on bottom two libraries and un-mark all other libraries.
Related
I'd like to create a simple program on Linux in order to adjust and fix the microphone level setting.
I'd like my program to, whenever my Mic level drops below 0.5, automatically revert it to 0.7 (for example).
Problem is: I don't know how to access these configurations on Ubuntu Linux with C++. I thought about using bash commands within my C++ code, but still need to read the mic level setting. How can my C++ program access these microphone audio settings, read and change them?
In college I just learn algoritms, but never how to make the programming language work with the system.
Thank You!
There is a multithreaded program that operates simultaneously with a device via COM port based communication and remote (IP) video stream. The program also uses OpenCV library to process the data.
The trouble is that it shuts down without any signals (neither run-time, nor any other errors are caught; log file has no anything useful as well). The most top level application error event handler is set and still there are no any signs of the program crash. It just closes after awhile.
The biggest difficulty is that it works fine on all our PCs for days non-stop. But fails on customers PCs so that testing process is very slow. Customer is in a different country (Asian localization, whilst ours is European), but the program is built with Unicode support.
So far we have got some assumptions about localization issues and antivirus activity... but it gives nothing in result.
The program is written with MinGW 4.4.x C++ and wxWidgets 2.9.3
Any suggestions of the probable origin would be appreciate.
Solved.
The problem was inside OpenCV build 2.3.1, that we use. The function cv::imdecode(...) uses stdio.h`s tempnam() function to generate temporary file during decoding. Under x86 Windows systems this function fails after 32767 new names for temporary file. Under x64 Windows systems it returns some nonsense string, but it still works.
So the solution I came with was to change the way of receiving-decoding images from our device.
Thanks everybody for comments.
I have a lot of simple C++ programs that I've written in XCode, using OpenGL and Glut to visualise scientific data. It works very well, but there is one minor annoyance: every time I run one of the binaries from outside of XCode, it opens a Terminal window. This means I get a crusty build-up of Terminal windows that has to be cleaned up after use.
Is there a way to prevent this from happening? I'm hoping for a quick solution to a very minor problem, so anything that requires me to learn Objective C or some fancy GUI creation tool isn't what I want. I just want to know if there's a way to compile my existing C++ Glut apps in such a way that the terminal window won't appear when you click on the icon.
Sort of... Basically, you need some kind of OS X wrapper to contain the binary. You can do this with Automator or AppleScript or with a tool like DropScript, which is designed to encapsulate unix binaries.
Otherwise, the solution for this would be to create a minimal Objective-C program and then she'll out the unix binary from within it, so that when it terminates it doesn't leave any residue.
I've been trying to research why certain compatibility features differ based on operating system so I can program a patch. I'm using the compatibility settings in the registry for Windows 95 to run a game (that of which the game was produced on) in each system. In Windows XP, the game runs perfectly. None of the scenes lag, and the sound works just as well as the scenes. I'm unsure of how it runs in Windows Vista, but in Windows 7 & 8 the compatibility feature breaks the game. I used a VM to run XP, but that doesn't effect the game's playability; real XP users have tested it. Whenever I play the game using the Win95 setting for compatibility in 7 & 8, everything lags. The music doesn't slow down during gameplay, but the graphics do. During cutscenes, they literally break. Everything pixelates, white noise and static increases volume, and the video lags every two seconds.
I therein tested it in Ubuntu Linux via WINE, and it runs better than it does in XP. I just had to use the alsa sound driver. What changed? If so, is it programmatically fixable? I'm using an amalgamation of C++, Batch and Java.
If it is necessary, the video game is entitled "The Neverhood."
Thanks.
The compatibility feature available in the shell is just scratching the surface of the "Application Compatibility" subject in Windows.
There is a tool called "Microsoft Application Compatibility Toolkit (ACT)" (that exist since Windows XP exist I believe) that has much more to offer, so maybe that can help.
For example here are some compatibility settings for Graphics Control Issues
I currently play "The Neverhood" on Win7 x64 without any visual problem, you are right when I played on Win7 for first time (4 years ago) was a headache and a little tricky to do the correct compatibility flags for each win version but finally I wrote this reg code for Win7 and worked for me while 4 years, sure it will work for you too:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
"C:\\Folder\\nhc.exe"="# WIN95 256COLOR 640X480 DISABLEDWM"
Where "C:\\Folder\\nhc.exe" of course is the path to your Neverhood. (Notice the double backslashes)
that flags means: Change Display color to 256 colors, change display resolution to 640x480, disable Themes service (DWM Service).
I hope this help you.
This may not answer the question directly, but if you want to improve performance of The Neverhood, change the compatibility to run in Windows 95 - then switch all other options ON, except the bottom three. This helps to make the game as fast and smooth as possible.
I am making a login page for a game , That uses outextxy() for output;
So I would like to have the input at a specific desired location ( at specific coordinates )
[using cin doesn't help it stills input from the top of the program ],
Is there any inbuilt function for this ??
I have even tried using gotoxy() ..but didn't work ,
gotoxy(320,15);
cin>>a;
It will be really helpful if u can explain or give a link to explain( if it requires good knowledge , cause i am still a beginner )
You are reading from cin just as you are used to. But it is you that should take care to display what is displayed. C++ won't do that for you. For instance if you are entering a string after entering a character, you have to display it in the desired location. Things get even messier once you start dealing with correction in the input(i.e. pressing backspace). I have implemented several games using graphics.h myself and remember dealing with all this tweaks was hell.
My proposal is that you try to use a more advance graphics library. My personal choice is usually opengl. For it you can find a lot of helper libraries for instance wxWidgets.
graphics.h is part of the ancient DOS library called BGI, delivered with old Borland compilers only. Borland stopped supporting this 15 years ago. In fact Borland doesn't even make compilers any longer. And no other compiler has ever supported it. Also, Windows no longer support 16-bit DOS programs so you can't even run BGI programs on modern computers.
Don't use graphics.h.
Better alternatives are OS-dependent. In Windows you should use the console functions API and in Linux there is a library called ncurses. Though of course, this would mean that you would have to upgrade to 32 bit computer...
oh i figured it out... it was stupidity on my part .. referred the help file and came to know that gotoxy has some maximum arguments ( but I still don't understand the value of arguements )
Courtesy : Lundin