Results 211 to 240 of 418
-
10-05-2008, 03:52 PM #211
Re: Turbo C/C++ graphics distorted
Try removing the restorecrtmode(); line.
-
10-05-2008, 04:28 PM #212Apprentice
- Join Date
- May 2007
- Posts
- 84
Re: Turbo C/C++ graphics distorted
damm what is wrong with people here? just download and install bloodshed for windows or geany for linux and get done with it!!
all these people trying to make a prehistoric piece of software work is just wrong!
why are u stuck to something which was made in like 1990 just because others use it? pffft..
-
10-05-2008, 05:07 PM #213
Re: Turbo C/C++ graphics distorted
removing restore command not working....
2ndly, that bgi archive not working....says its corrupt...
3rd....trying bloodshed if possible
Enjoy~!No Pain...No Gain
-
10-05-2008, 06:27 PM #214
Re: Turbo C/C++ graphics distorted
The BGI archive is alright, I just downloaded it!!
-
10-05-2008, 07:54 PM #215
Re: Turbo C/C++ graphics distorted
Offtopic, but he actually installed latest nvidia drivers so he could run BGI graphics... I salute you man, you just redefined the meaning of "graphics card".
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file
-
10-05-2008, 09:17 PM #216
Re: Turbo C/C++ graphics distorted
@dheeraj: thank you
will try bgi again but i guess tats not issue....bgi files r present only thing they aint in seperate folders...al mixed up
Enjoy~!No Pain...No Gain
-
10-05-2008, 10:42 PM #217
Re: Turbo C/C++ graphics distorted
Er... speedyguy, I was being sarcastic.
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file
-
10-05-2008, 11:06 PM #218
Re: Turbo C/C++ graphics distorted
i was too dude....sorry fr being ignorant 2 ur sarcasism but may be aftr gettin my things resolved i'll join u....
Enjoy~!No Pain...No Gain
-
11-05-2008, 12:46 AM #219
Re: Turbo C/C++ graphics distorted
Did you try Dosbox?
I am using this for running TC in Ubuntu. I believe there is a windows port also.An open source DOS emulator for BeOS, Linux, Mac OS X, OS/2, and Windows. Primarily focuses on running DOS Games.
It runs DOS programs very well with alomost zero configrations.
It even runs those 16bit games, which stopped running since Windows NT
-
11-05-2008, 01:06 AM #22018 Till I Die............
- Join Date
- Jul 2004
- Location
- India, Mumbai, Marine Lines
- Posts
- 5,792
-
11-05-2008, 01:27 AM #221
Re: Turbo C/C++ graphics distorted
Dude, remove the clrscr() from there and put cleardevice() inplace of it. Also at the end of program call restorecrtmode() after calling closegraph(). That will help i think. And that BGI directory stuff won't matter. I have seen people having two types of installation of TC++, one that contains all the files in the same dir and other which contains files in different subdirectories. Both versions work fine as long as path is set right at all the places. so if you have all the files in, say, c:\tc then specifying c:\\tc in initgraph will work, provided that the driver file egavga.bgi is present in the directory.
I hope this clear things up for everyone. Correct me if i am wrong somewhere
Laptop: Lenovo G580 - Core i5 Ivy Bridge 3210M (2.5 - 3.1 GHz), 4 GB RAM, 500 GB, Intel HD 4000 Graphics, 15.6" LED Display :)
OS: Genuine Windows 8 Pro 32 Bit, Fedora Linux 17 32 Bit.
Phone: HTC Sensation (ICS 4.0.3, Sense 3.6), 1 GB per Month 3G/HSDPA
Internet: Mumbai : Airtel 2 MBPS / 24 GB @ Rs. 1050 Plan, Tata Photon+ 3.1 Mbps
-
11-05-2008, 09:03 AM #222
Re: Turbo C/C++ graphics distorted
If the Start Windows Restart when Windows starts check box is checked Windows Restart will start automatically every time Windows is started. - Actual excerpt from a windows program help file
-
14-05-2008, 05:23 PM #223
Re: Turbo C/C++ graphics distorted
@Krazy_About_Technology : placing cleardevice() is not bringing up the output screen...it compiles n remain at editor screen....restorecrtmode is kept aftr closegrph function...
Enjoy~!No Pain...No Gain
-
28-05-2008, 08:01 PM #224Fresh Stock Since 2005
- Join Date
- Feb 2005
- Posts
- 1,015
Re: Turbo C/C++ graphics distorted
I used TC Graphics for my Galaxian-Like game for the 1st sem project in C..
This sem (3rd) we decided to code Mario .. no wonder it was barely possible to scroll the screen and load bitmaps and all.. So went for Allegro Gaming Library... It has a manual and examples.. Mario is almost complete...
I suggest u to dump TC graphics and use Allegro..http://www.khattam.info
-
07-06-2008, 02:33 PM #225
Re: Turbo C/C++ graphics distorted
can u tel me if thrs diff betn allegro, bloodshed n tc as far as coding is concerned...coz i know coding via tc only....
Enjoy~!No Pain...No Gain
-
15-09-2008, 08:36 PM #226
Re: Turbo C/C++ graphics distorted
hi again,
time has come for me now 2 get in2 graphics for my projects n i still havnt got rid of my issues....plz help me out if thrs an alternative 2 turbo c++ fr graphics...iv tried borland visual but no help as yet...
m posting a proper detail of wat issues m facing wit visuals...plz take a carefull look...
this is on editor windows(turbo c++) wit a dda/bresenham program for linedraw-

this is now into output screen wich is already seen distorted....try 2 read..."enter end points ......... "

this is aftr providing the inputs...u can see d required line but again its distorted at top...it cn b randomly anywhr...
[img=http://img403.imageshack.us/img403/2959/img1353wf8.th.jpg]
and now back 2 editor window...eew! can u even see anything....ts all messed up....dunno wat d hecks wrong...

more observations - wen i press alt-enter aftr this 2get 2 windowed screen it gets back 2 normal wit d editor window.....
as soon as i use initgraph....the screen behaves like this.....
my system is (again)-
amd turion64 X2 1gb ddr2,
nVidia geforce go 6150,
hp pavilion tablet pc (tx1000 series)
12" lcd screen...
thanx,
Enjoy~!No Pain...No Gain
-
05-10-2008, 06:59 PM #227
Re: Turbo C/C++ graphics distorted
hi plz reply if any small idea u have...
thrs one more observation i saw....thr problem is not wit my coding....ts wit my DOS graphics....even other Dos based games r not working in ma system....
Enjoy~!No Pain...No Gain
-
31-10-2008, 01:22 AM #228Right Off the Assembly Line
- Join Date
- Oct 2008
- Posts
- 1
Re: Turbo C/C++ graphics distorted
ive been experiencing d same problem...
ive got d same Geforce 6150
its exactly d same... hve been trin all sorts line drawing/clipping algo's ... none of my graphics programs r wrkin fine... may b its a hardware issue...
hve exams comin closer day by day... nd ders no place to practice
do u hve ny alternative 4 dis?
-
31-10-2008, 07:19 PM #229
Re: Turbo C/C++ graphics distorted
thrs no issue wit bgi graphics in c++....the graphics in dos is screwed up wit ur system....mine too.....try dos based games even they wont work...
try booting in safe mode wit command prompt n c if it can work wit c++...
else use DosBox Emulator.....that shud work...
Enjoy~!No Pain...No Gain
-
04-11-2008, 09:42 PM #230
Re: Turbo C/C++ graphics distorted
@speedguy did DosBox worked for you?
Parkour: A journey started by two & followed by many...
-
05-11-2008, 01:02 PM #231
Re: Turbo C/C++ graphics distorted
ya dosbox worked fine...but it reduces executing speed....so not gettin exact idea abt its speed wit other systems...
Enjoy~!No Pain...No Gain
-
25-11-2008, 08:26 PM #232
Turbo C/C++ and other junk compilers discussions and queries here
hey all,
m learnin c++...i wantd to ask wat is the role og "getch()" in a program.....
i mean most of the programs mentioned in buks nd even on websites don't have a "getch" wriiten before closing main()....but i hv seen dat to get d desired result....i always have to add dis......
why is dis so?? nd is it necessary????
-
25-11-2008, 08:53 PM #233
-
25-11-2008, 09:03 PM #234
-
25-11-2008, 09:05 PM #235
-
25-11-2008, 09:08 PM #236
Re: getch() in c++
getch() is used for obtaining the desired output
Try removing any of the header file iostream.h and conio.h and see which header file supports getch()
MrinTech | Exam Dunia :)
Some gadgets I own: Dell Inspiron 15R | Asus X53U-SX013D | iPad 2 | Samsung Galaxy S+ | PS3 :)
-
25-11-2008, 09:23 PM #237
Re: getch() in c++
are u sure ?? did u try to see what happens when u dont add getch() to your program ??[/quote]
yup...i did......
wen i 5run d progrm (a normal & simple c++ prog..) a blank screen appears for 2-3 sec nd then it goes bak to my program screen....
-
25-11-2008, 09:47 PM #238
Re: getch() in c++
^^ so see.. now u know what the use of the getch() is in your program...
anyways, basically, getch is used to single-byte character from the terminal ... so once u add getch, your output screen waits for you to enter a key (which normally is the enter key)
so once u hit enter, the screen is no longer there.
btw, when u dont add getch(), it doesn't mean that your program isn't correct or anything...only your output window doesn't wait for you to take your own time to read all the output that you get...
hope now u've understood what the use of getch() is.
and btw, use system("pause") instead of getch() and check out what happens
-
25-11-2008, 09:47 PM #239
Re: getch() in c++
This thread was not supposed to have so many posts, damn you T159! It doesn't have anything to do with ANSI/non-ANSI

getch - get a single-byte character from the terminal.
When you call getch() (A Windows Platform-only function), it goes into an input event loop and waits for a single character to be entered (and pressed). And it stores that character into a variable, or discards it if you haven't provided one, like in these cases:
Input-loop as in it goes into a wait-for-user-to-press-a-key mode. You can see it like the behaviour of some applications that say "Press any key to continue...".Code:#include <iostream.h> #include <conio.h> void main() { char c; c = getch(); // Gets and stores a user-input character cout << c << endl; cout << "Press any key to exit."; getch(); // No variable, used to get into an input-event loop. }
When Turbo C runs a program for you, it returns to the editor immediately after the program exits a.k.a the end of main(). So it will appear like your program has started and terminated all of a sudden after your input is given.
Originally Posted by garfield_56
As you yourself said, "to get the desired result" which here, is to wait for the user to see the final output, we use a getch(). To give that "Press any key when you have seen the output and exit" effect. Thats all there is to its use in Turbo C programs.
If you ran your compiled program via normal DOS mode, you won't need this feature.
For an example, try running a program without a clrscr() function. You will see the old successful output (upon successive runs), meaning it has nothing to do with the program's working.
You do know compilers are platform-dependent and also architecture-dependent. Code might not be but compilers are. Thus, there came out several multi-featured platform-specific compilers after the C++ language was developed. These specialized compilers like borland aimed to provide good pre-built libraries for programmers to use.
Originally Posted by garfield_56
The standard compiler (like ANSI) contains only those functions that can run across all platforms, from OSX to Linux. These specialized compilers come for one specific platform, like Borland for Windows. And they provide Windows-usable special functions, of which things like getch() are a part of.
For learing, using a standard compiler (GNU C Compiler for example) is the best practice, so that what you learn is all things standard (works across all OS) and you won't develop dependence on some particular OS-specific function like getch(). This is but one of the many reasons why people keep recommending them.
Note: Do read my entire post. Not this line alone.Harsh J
www.harshj.com
-
25-11-2008, 09:51 PM #240
Re: getch() in c++
^^ now that is one detailed explanation

btw, i read half your post and of course the last line
Similar Threads
-
Why is this program rejected by C++ compilers?
By gopi_vbboy in forum LifestyleReplies: 13Last Post: 03-05-2012, 12:23 AM -
compilers
By arpanmukherjee1 in forum ProgrammingReplies: 1Last Post: 26-09-2008, 09:31 PM -
Where to get C++ compilers?
By redhat in forum ProgrammingReplies: 12Last Post: 19-09-2008, 07:01 PM -
Compilers For C And C++ ?
By clmlbx in forum ProgrammingReplies: 31Last Post: 26-01-2008, 07:25 AM -
C/C++ compilers for win xp x64
By setharsh in forum Software Q&AReplies: 5Last Post: 22-12-2006, 02:25 PM


LinkBack URL
About LinkBacks
Reply With Quote
Because I am most of the times.
Bookmarks