Hi pals, I am a Newbie in C++ Programming field. I plan to add graphics.h header class in Dev -C++ Version 4.9.9.2 from Bloodshed which is come along with Borland Compiler. I follow the Steps in URL : [url]http://www.uniqueness-template.com/devcpp/#step2[/url] But I Got Error in the Sample code which test the Working , Please Help me to get away from this problem . I am waiting to hear from you. Regards Anes P.A:'(

Member Avatar
Member Avatar
+1 forum 14

Roots of quadratic equcation #include<iostream.h> #include<conio.h> #include<math.h> void main() { float a,b,c,disc,root1,root2; cout<<"enter a"<<endl; cin>>a; cout<<"enter b"<<endl; cin>>b; cout<<"enter c"<<endl; cin>>c; disc=(b*b)-(4*a*c); root1=(-b+sqrt(disc))/(2*a); root2=(-b-sqrt(disc))/(2*a); cout<<"root1"<<root1<<endl; cout<<"root2"<<root2<<endl; getch(); } any question or assignment ask to me!guys

Member Avatar
Member Avatar
+0 forum 8

I got 2 Declaration syntax error... i really need help :D Thanks! Btw .. i'm using Borland C++ #include<iostream.h> #include<graphics.h> #include<stdlib.h> #include<stdio.h> #include<ctype.h> #include<conio.h> void main() {clrscr(); int opt,opt1,opt2,opt3,opt4,opt5,opt6; /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int style, midx, midy; int size = 1; int x,y; /* initialize graphics and local variables */ initgraph(&gdriver, &gmode, "C:\\BorlandC\\BGI"); Repeat: cleardevice(); do { setbkcolor(BLUE); settextstyle(TRIPLEX_FONT,0,4); setcolor(GREEN); outtextxy(265,10,"::Menu::"); settextstyle(TRIPLEX_FONT,0,3); outtextxy(190,40,"::Metoda Backtracking::"); settextstyle(TRIPLEX_SCR_FONT,0,1); outtextxy(20,100,"1. Teorie."); settextstyle(TRIPLEX_SCR_FONT,0,1); outtextxy(20,120,"2. Subprogramul Fix Back()."); settextstyle(TRIPLEX_SCR_FONT,0,1); outtextxy(20,140,"3. Probleme."); settextstyle(TRIPLEX_SCR_FONT,0,1); outtextxy(20,160,"4. Iesire."); gotoxy(24,13); settextstyle(TRIPLEX_SCR_FONT,0,1); outtextxy(20,184,"Alegeti Optiunea: ");cin>>opt; switch(opt) { case 1: { clrscr(); //system("cls"); cleardevice(); setbkcolor(BLUE); settextstyle(TRIPLEX_FONT,0,3); …

Member Avatar
Member Avatar
+0 forum 5

Hi, I need little help with using MediaPlayer from System tab in Borland Builder 6 for C++. Does anyone know what member function of MediaPlayer returns bool variable which tells us is music currently being played or not? I have seen solution for this problem where we use Timer which has frequency which equals the length of song that is being played, so as soon as specified time passes, Timer switches to the next song. But I wish to know is that the only way. Thank you!

Member Avatar
+0 forum 0

Hi, Is anyone familiar with this problem in BorlandBuilderC++: void Print(AnsiString Path){ Label1->Caption=Path.c_str(); } ... Print("C:\Directory1\Directory2\Music.mp3"); When I pass this string to Print(AnsiString) and try to display it in Label1, I lose all '' signs and text in Label1 looks like this : **"C:Directory1Directory2Music.mp3"** Why is this like that? Thank you!

Member Avatar
Member Avatar
+0 forum 2

Hi, I have simple question: how do I make Windows Media Player in BorlandC++ ( an ActiveX component ) plays all songs from specified folder? Thanks.

Member Avatar
+0 forum 0

Hi, Can you tell me how can I make my application recognizes when the user presses a button on keyboard? *For example*: presses 'S', application prints "Hello.". I need this information for BorlandC++, but it would be useful even though you provide the same for VC++ :) *(I am not talking about console applications, I need these tips for GUI apps )* Thank you!

Member Avatar
Member Avatar
+0 forum 6

/*PROGRAM TO PRINT SUM OF THE FOLLOWING SERIES - X + X*X/2! + X*X*X/3! + X*X*X*X/4!....n terms. I'm not getting the correct output. eg-for n=3 and x=2; compiler's ans = 4.66 correct ans = 5.3. HELP ME OUT...*/ [CODE]#include<iostream.h> #include<math.h> #include<conio.h> void main () { clrscr(); float x,sum=0; int n,fact=1,j,k; cout<<"\nEnter For n"; cin>>n; cout<<"\nEnter For X"; cin>>x; for(int i=1;i<=n;++i) { j=i; k=i; { while(j) { fact=fact*j; --j; } } sum+=pow(x,k)/fact; } cout<<"The Sum Of Series Is:"<<sum; getch(); } [/CODE]

Member Avatar
Member Avatar
+0 forum 7

I have only started learning borland c++ programming a few months ago, I'm actually a math student, so my knowledge of c++ is pretty limited. I have an assignment where X represents an ant that moves around in a 7x7 grid box. It can move up, left, down or right by 1 step at a time. I have already written the code, but sometimes the 1st 7x7 grid displayed is sometimes distorted. It only displayed a 7x3 grid. Please let me know what is the mistake I made. I know my course is not so efficient, I just want to …

Member Avatar
Member Avatar
+0 forum 2

Hi there, I'm having some real issues with restoring a piece of legacy software at my workplace. I have an offending line of code that I can't debug. [CODE]bFound := tblComp.Locate('CompPhone;Title;AddLine2', VarArrayof([sPhone, sTitle, sAddLine2]), [])[/CODE] When the script gets to this point sPhone, sTitle and sAddLine2 are correctly populated. When it gets to this line it throws the above error: Project XXX.exe raised exception class EDBEngineError with message 'Operation Not Applicable' If anyone has any pointers of why this might be happening or how to go about solving the issue that would be great. Thanks, Bernie.

Member Avatar
Member Avatar
+0 forum 3

Hello, I have problem using StrToDateTime function from Borland in my project. I made a custom component, it's called Month view (calendar). One of the basic steps of the component's initialization is to set the default month and year. To do this, I use the "1/1/2010" string passed to StrToDateTime function. Everything runs OK on my PC but as soon as I try running the application on another PC, it says: "'1/1/2010' is not a valid date". The initialization will fail and calendar won't show up. Please help me...

Member Avatar
Member Avatar
+0 forum 5

I have been given an assignment to plan, code, and execute a program to calculate data about a person. I am not here asking about how to code the program, but rather to troubleshoot at what's wrong with my compiler/command prompt. Here's what's happening: I will code a program in C++ using Crimson Editor as my text editor. With Windows XP, I use Borland Free Compiler to compile through the Command Prompt. After it compiles I execute(run) the program, but instead of printing the desired output to the command prompt screen, it opens a file with the .cpp code as …

Member Avatar
Member Avatar
+0 forum 8

Hello, I'm working on a project that involves making two dlls: one of them is in Borland C++ (file1-bc.dll), the other one is in Visual C++ (file2-vc.dll). Right now I'm prototyping and trying to make them as simple as possible and to see data being exchanged from one side to another. The working scenario is as follows: file2.dll uses LoadLibrary("file1-bc.dll") and FindProcAddress to invoke methods to obtain data from file1-bc.dll. Came to the point of loading a set of information; using a std::list seemed like a good idea. Although both projects are compiling and linking ok, when I try to …

Member Avatar
Member Avatar
+0 forum 6

Hello guys, this is my first time in these forums, so I apologize for my bad English. Well, here's the problem: I need to get the frequency of integer numbers that are stored in a file, their range is from 0 to 100, their amount is unknown and depends on the length of the file. Working with the file is the easy part, but getting the frequency of each 100 numbers is. I tried everything, even putting integers from 1 to 100 in an array, and comparing each of them with the numbers in file using two [I]for[/I] loops, or …

Member Avatar
Member Avatar
+0 forum 8

hey xpert i'm class 12 cbse student...unfortunately i'm not able to get the output from my project. the project is based on bank employee detail.........i'm gettin the output ,but the thin is xcept aading records of the employee i'm not able to do other operation like modifiaction,deletion,listing...!!!!!!! your will be appreciated>.>!!!! ;) [CODE] //A PROGRAM TO MANAGE BANK ADMINISTRATION #include<fstream.h> #include<conio.h> #include<stdlib.h> #include<stdio.h> #include<iomanip.h> #include<string.h> #include<graphics.h> #include<dos.h> void graphic_screen(); class group { private: struct person { char flag; char empcode[5]; char name[40]; int age; int sal; }p; fstream file; public: group(); void addrec(); void listrec(); void modirec(); void delrec(); void …

Member Avatar
Member Avatar
-3 forum 2

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

Member Avatar
Member Avatar
+0 forum 24

I'm working on a Project, which includes downloading some files from INTERNET, and the code language is C++, I'm using Codegear C++ Builder 2009, If anyone knows how to download a file using c++ code. please help me, I'll be greatly thankful if you provide a code snippet and then explain using that. Thanx in Advance.

Member Avatar
Member Avatar
+0 forum 1

The End.