C language doesn't say anything about graphics, it is platform-dependent.
C++ has no built-in graphics methods. C++ is a machine-independent programming language, but graphics are machine-dependent. To make use of graphics of any kind, you must use a suitable graphics library. If you need cross-platform support, use a generic library.
It has no use in C++ itself, it is only useful in Borland Turbo C++. It provides generic graphics support for Borland Turbo C++ applications.
I don't use that function in C programme.
C has no native support for graphics. You would either have to use your local APIs or use an external library (ex: OpenGL).
C does not define a setpixel() function; it is a non-standard function. C is intended for general-purpose programming but graphics handling is system-specific. There are third-party libraries available to cater for graphics handling (many of which are generic) but without knowing which library you are using nor on which platform, it would be impossible to demonstrate a setpixel() function in any meaningful way. Best advice is to consult the documentation that came with your graphics library.
C has nothing to do with graphics.
C has nothing to do with graphics.
C++ has no built-in graphics methods. C++ is a machine-independent programming language, but graphics are machine-dependent. To make use of graphics of any kind, you must use a suitable graphics library. If you need cross-platform support, use a generic library.
If you mean how do you draw a curve in C++, you can't. C++ does not have any built-in graphics support of any kind. All graphics are platform-specific so, to be able to draw graphics, you need a graphics API and library suitable for your platform and hardware. As a result, the code you use will not be portable. In most graphics libraries you will draw curves as a series of arcs, so you want to look up the arc() function in your library documentation.
There is no such function as sector in C++. You probably mean the sector function that was originally provided by Borland's Graphic Interface library (BGI), now owned by Embarcadero, but you won't find this function in any standard implementation of C++ since all graphics coding is platform-dependent. That is, C++ is intended to be generic and therefore has no built-in graphics support whatsoever; you have to use a graphics API and library that supports your specific platform's graphics devices. That said, the Borland/Embarcadero version of the sector function is typically used to draw and fill a pie-chart segment of an elipse (or circle). As such it probably isn't the best function for drawing stylised clouds. You'd probably be better off using a series of arc functions instead.
I don't use that function in C programme.
It has no use in C++ itself, it is only useful in Borland Turbo C++. It provides generic graphics support for Borland Turbo C++ applications.
You can use graphics libraries in C, but those are platform-dependent; for Dos/TurboC consult BGI.H and BGIDEMO.C
C has no native support for graphics. You would either have to use your local APIs or use an external library (ex: OpenGL).
C does not define a setpixel() function; it is a non-standard function. C is intended for general-purpose programming but graphics handling is system-specific. There are third-party libraries available to cater for graphics handling (many of which are generic) but without knowing which library you are using nor on which platform, it would be impossible to demonstrate a setpixel() function in any meaningful way. Best advice is to consult the documentation that came with your graphics library.
#include #include #include #include #include #include void fill(int x,int y,int c,int bon); void main() { clrscr(); int gdriver=DETECT,gmode; initgraph(&gdriver,&gmode,""); setcolor(WHITE); line(0,316,640,316); bar(297,170,300,316); bar(195,170,297,173); setcolor(8); circle(190,170,5); floodfill(190,170,8); setcolor(WHITE); bar(184,170,179,173); bar(177,170,180,176); bar(189,164,191,160); bar(186,160,194,158); line(150,315,210,315); line(150,315,150,260); line(210,315,210,260); line(147,257,210,260); line(213,257,210,260); getch(); setcolor(BLUE); for(int j=178;j<=314;j++) { line(179,178,179,j); line(178,178,178,j); delay(20); } int b=1; for(int i=314;i>260;i--) { setcolor(0); line(179,314-b,179,314-b); line(178,314-b,178,314-b); fill(178,i,1,15); b++; } setcolor(0); line(179,178,179,260); line(178,178,178,260); getch(); closegraph(); } void fill(int x,int y,int c,int bon) { int curr=getpixel(x,y); if(curr!=c) { if(curr!=bon) { putpixel(x,y,c); fill(x+1,y,c,bon); fill(x-1,y,c,bon); delay(2); } } }
C++ has no graphics ability whatsoever. C++ is a machine-independent programming language, but graphics are machine-dependent. To use graphics in C++ you must use an appropriate library. If you need cross-platform support, you must use a generic library. Each library has its own specific methods for accepting input thus you must consult the library documentation for more information on this aspect.