can anyone guide me how to run a c++ program inclusive of graphics through notepad++ by using borland compiler
OR
plz guide me hw to compile n run a c++ graphics prog in vista..as it's not possible by normal tcpp

Recommended Answers

[QUOTE=Shillz;1098401]dude i knw hw to speak/explain in english...
n also the prblm m facing...
may b u r not undersatanding[/QUOTE]

obvsly nt sc y cnt wr a dcnt sntce.

Jump to Post

All 24 Replies

Re: c++ and notepad++ 80 80

Well for graphic programming there are 2 major tools (well not exactly tool)

1. OpenGL
2.DirectX

Since u want windows oriented ,it would be prudent to go with DirectX .

This will get u started.

http://www.two-kings.de/tutorials/dxgraphics/

Re: c++ and notepad++ 80 80

i meant c++ graphics..not other ones...

Re: c++ and notepad++ 80 80

i meant c++ graphics..

No such thing, at least not in standard C++. What you have is a non-standard library which was created by Borland (and others). If you are still trying to use a ca. 1993 Turbo 3.X technology on a ca. 2006 operating system then you may be out of luck. What Rahul is trying to say is that there are libraries out there that are more current and supported by recent versions of Windows.

Re: c++ and notepad++ 80 80

yaar i think u r nt getting my prblm...
i have windows vista in my laptop..it supports tcpp in small screen but does not run ny program hving graphics,i.e.,programs hving header file graphics.h...
thats y i need to use notepad++ as suggested by my lecturar..but m not able to compile n run my prog in it...n need to know where m i gng wrng...

commented: stop the chat room talk -5
Re: c++ and notepad++ 80 80

well then u gotto to be a little specific here ,
AS far as i guess , ur saying ur not able to run graphic program
the possible reasons could be

1. there is no graphic lib
2. There exist graphic lib but , its not linked to

Notepad++ is a code editor thats all , its got nothing to do with ur graphics not running,

Re: c++ and notepad++ 80 80

yaar i think u r nt getting my prblm...
i have windows vista in my laptop..it supports tcpp in small screen but does not run ny program hving graphics,i.e.,programs hving header file graphics.h...
thats y i need to use notepad++ as suggested by my lecturar..but m not able to compile n run my prog in it...n need to know where m i gng wrng...

I had the same problem with my new computer with Windows XP sp3.
bgi graphics (that is graphics.h) can't be run in some computers including laptops. so try changing your laptop or computer. there may be a problem with new CPUs. use an older computer.:)

Re: c++ and notepad++ 80 80

these programs can b compiled using notepad++..theres no need to chage lappy...
jst that m not getting hw to compile it using notepad++

Re: c++ and notepad++ 80 80

these programs can b compiled using notepad++..theres no need to chage lappy...
jst that m not getting hw to compile it using notepad++

As others have tried to tell you -- Notepad++ is not a compiler. I think you can tell notepad++ how to run a a compiler, but notepad++ doesn't compile anything itself.

Re: c++ and notepad++ 80 80

i know tis not a compiler...
n m asking to tell me how to make notepad++ to compile c++ program

Re: c++ and notepad++ 80 80

m not getting hw to compile it using notepad++

i know tis not a compiler...
n m asking to tell me how to make notepad++ to compile c++ program

No one can help you if you yourself don't know what you want. Maybe you are just having problems trying to explain it in English language??

Re: c++ and notepad++ 80 80

dude i knw hw to speak/explain in english...
n also the prblm m facing...
may b u r not undersatanding

Re: c++ and notepad++ 80 80

If you have a compiler already installed, and in your PATH environment variable, then just press F5 and type
gcc prog.c
where gcc is the name of your compiler, and prog.c is the current filename you're editing.

Then press F1 to figure out how to make the command automatically substitute the name of the current filename.

>dude i knw hw to speak/explain in english..
Lastly, drop the SMS chat speak.
http://www.catb.org/~esr/faqs/smart-questions.html#writewell

Re: c++ and notepad++ 80 80

dude i knw hw to speak/explain in english...
n also the prblm m facing...
may b u r not undersatanding

obvsly nt sc y cnt wr a dcnt sntce.

commented: Nice +1
Re: c++ and notepad++ 80 80

@ salem

ok..m sorry for that...
i wrote the following program

#include<graphics.h>
#include<conio.h>
using namespace std;
void main()
{
	int gdriver=DETECT,gmode;
	initgraph(&gdriver,&gmode,"");
	line(0,0,100,100);
	getch();
	closegraph();
}

by the name line.cpp
i tried the method you had told but it's not working

Re: c++ and notepad++ 80 80

>>but it's not working
What exactly does that mean? Did you get compile error messages? Yes, then post a few of them

>>int gdriver=DETECT,gmode;
That looks very questionable -- why use the comma operator ?

Re: c++ and notepad++ 80 80

no error message..nothing happens

>>int gdriver=DETECT,gmode;
this means
int gdriver=DETECT;
int gmode;

>>but it's not working
What exactly does that mean? Did you get compile error messages? Yes, then post a few of them

>>int gdriver=DETECT,gmode;
That looks very questionable -- why use the comma operator ?

Re: c++ and notepad++ 80 80

Sorry, but I can not help you because TurboC can not be installed on Windows 7 os (I just tried it).

Re: c++ and notepad++ 80 80

its ok sir..thank you for trying

just have a doubt..i read that all softwares of XP are supported by windows 7, unlike vista..is it not so?
i was planning to get windows 7..thats why asking you


Sorry, but I can not help you because TurboC can not be installed on Windows 7 os (I just tried it).

Re: c++ and notepad++ 80 80

If that turboC compiler is working for you ok with xp than don't upgrade to Windows 7. There is supposed to be an XP compatability mode but it is not in the Home Prem version that I have (at least not that I know of). I also have 64-bit version of Windows 7 and the error message I got when I tried to install TurboC was that the installer was not compatible with 64-bit Win7.

Re: c++ and notepad++ 80 80

the problem is clear. graphics.h can't be used in NON BORLAND compilers (in a normal way).

initgraph(&gdriver,&gmode,"");

instead of "" there MUST be the address of the BGI folder, wich can be found in old Borland compilers. (I think Borland C++ 5 1997 is the last version of Borland compilers which support BGI).

// I guess you found the cde & y want to compile it in er non borland cmplr.
Re: c++ and notepad++ 80 80

tried to install TurboC was that the installer

don't run the installer, copy the installed folder. who runs the installer of a 16bit compiler?

an XP compatability mode

as long as I remember Vista can run programs with compatibility to previous versions of windows. Windows 7 can, for sure.


And forgot to say @shillz
try to run

#inlcude <stdio.h>
int main()
{
     printf("my compiler works");
}

if it works then try to run a graphics program. this program is a first step to chck the cmplr. you shouldn't overpass this step.

Re: c++ and notepad++ 80 80

don't run the installer, copy the installed folder. who runs the installer of a 16bit compiler?

I don't have an install folder, just a bunch of *.zip and *.cab files. Attached is a list of the files

Re: c++ and notepad++ 80 80

well this is not an installed folder. you'll get one after installing what u have on a third party computer.
any way, try uzipping Bin.zip. then try to run BC.exe or TC.exe. this is the compiler's IDE exe.
This is most probably my last post in this thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.