I have written a Borland C++ database program some time ago that has been migrated to a new machine running Windows 7 home premium. Errors are showing up that suggest a problem with the relationships between tables ( related records are being mixed up ). When I check the tables on my XP machine there is nothing wrong and the relationships appear fine. Is there a feature with 7 that can cause these type of errors? Can anyone suggest the best way to prevent this from happening? Thanks in advance.

Member Avatar
Member Avatar
+0 forum 3

# include <iostream> using namespace std; int main() { cout << "By this program you can know about Whether a number is a or not" ; cout << "Enter a number less than 1000 :- "; int a,b,c,e,f,g,k ; cin >> a; if (a < 1000) b=a/10; k=b+2 ; c=a-(k*10); e=k/10 ; f=k-(e*10) ; g=c*c*c+e*e*e+f*f*f ; {if (g==a) cout << b <<"Yes" ; else cout << b << "No" ; } else cout << "is not" ; }

Member Avatar
Member Avatar
-1 forum 1

im doing a college project in c++. it is a token system of bank(line,queue..).it waits for a enter key and then it creates a token with entry time and expected leaving time,cashier to attend to and token no. whenever i compile the program it gives no error but after runing it stops and i get an error saying general protection exception processor fault...it stops at a structure pointer to a time variable..plzzzz help,i have to submit this tomorrow thnaks for help in advance and thanks daniweb.heres my code [CODE]#include<conio.h> #include<iostream.h> #include<time.h> #include<windows.h> #include<stdlib.h> struct cashier{ time_t endtime; //cashier c[3]; }*c11,*c22,*c33;//c[0]->endtime=time(),c[1]->endtime=time(),c[2]->endtime=tme(),c[3]->endtime=time(); …

Member Avatar
Member Avatar
+0 forum 3

can any one please tell me am i done my question right? my question is to store store 1035 to 1265 random in a character array and display the array. and im not sure whats this srand is doing? [code] #include<iostream> #include<stdlib> #include<conio.h> int main(){ srand(1035); char b[30]; for(int i=0;i<30;i++) { b[i]=(1+rand()%(1265)); } for(int i=0;i<10;i++) { cout<<b[i]; } getch(); return 0;} [/code]

Member Avatar
Member Avatar
+0 forum 7

i have two questions 1st is can any one please tell me what is the role of setprecision in C++, why it is used? 2nd is : this statement [code]totalS+=sales[i][j];[/code] is equivalent to what, i.e what is the role of this += thanks alot

Member Avatar
Member Avatar
+0 forum 3

My question is when user enter any key from the keyboard including arrow keys, it should print one asterisk * , when user will again press any key it will add one more asterisk and ,and when user again press any key from keyboard it should add one more asterisk, so on... when user will press backspace it should remove only one * just like password writing... my problem in my following code is that when i press any key from keyboard that has ascii value it is working fine.. but when i enter any key that has scan code …

Member Avatar
Member Avatar
+0 forum 1

I need example parking system with C++ programming - logIn - record, incoming vehicles - records, out of vehicle - parking fees if there is a more complete I am very grateful :D I hope friends can help me, thanks

Member Avatar
Member Avatar
-4 forum 4

[CODE]#include<stdio.h> #include<conio.h> void main() { int a; printf("\nEnter number of inputs: "); scanf("%d", &a); for( int x=1; x<=a; x++ ) { for( int y=a-x+1; y>=1; y--) { printf("%d",y); } printf("\n"); } getch(); } [/CODE] im still a noob. i know the output of this one. but i cant seem really understand the logic. i forgot what our instructor told us. :(

Member Avatar
Member Avatar
+0 forum 5

TURBO C ++ HELP! INTERATIVE STATEMENT Im a beginner so please help me. USING FOR LOOP: write a program that will display the following pattern, given the value of n. example: of n=4 output: 1234 123 12 1

Member Avatar
Member Avatar
+0 forum 6

[CODE] #include<stdio.h> #include<conio.h> #include<stdio.h> void maketree(struct node**); void inorder(struct node**); struct node{ struct node *left; struct node *right; int data; } void main() { struct node *root; root=NULL; printf("Enter root"); maketree(&root); preorder(&root); getch(); } void maketree(struct node **root) { int num; struct node *temp; if(*root==NULL){ //printf("Enter number"); scanf("%d",&num); temp=(struct node*)malloc(sizeof(struct node)); temp->data=num; temp->left=temp->right=NULL; } if((*root)->data!=0){ printf("enter left of %d ",(*root)->data); maketree(&(*root)->left); printf("Enter right of %d ",(*root)->data); maketree(&(*root)->right); } } void ineorder(struct node *root) { if(root!=NULL) inorder(root->left); printf("%d->",root->data); inorder(root->right); } [/CODE]

Member Avatar
Member Avatar
+0 forum 4

I am having trouble getting my program to run. I can't figure out where this error is...prob. something easy and i'm just to tired to find it. Anyways here is the project details and the c++ code that I have wrote is attached below since I haven't messed with the code wrap yet. If there are any suggestions on how I can make the program easier pls tell me your 2 cents. error: 56: ) expected in function main() I counted and couldn't find where i left a ")" off if someone would show me another way to write the …

Member Avatar
Member Avatar
+0 forum 2

I have problem in reqruired output [B]the input is[/B] 333-0092-8868389 [B]required output is[/B] Country code is = 0092 City code is = 333 7-digit number is = 8868389 Phone number in correct sequence is = 0092-333-8868389 The full code is [CODE] #include<iostream.h> #include<conio.h> #include<string.h> #include<stdio.h> void main() { [COLOR="Red"]char ch,*str,*country,*city,*digit;[/COLOR] cout<<"Enter the complete phone number: "<<endl; gets(str); char *first=strtok(str,"-"); char *second=strtok(NULL,"-"); char *third=strtok(NULL,"-"); if(strlen(first)==4 && strlen(second)==3) { strcat(country,first); strcat(city,second); strcat(digit,third); } else if(strlen(first)==3 && strlen(second)==4) { strcat(city,first); strcat(country,second); strcat(digit,third); } else if(strlen(first)==7 && strlen(second)==4) { strcat(digit,first); strcat(country,second); strcat(city,third); } else if(strlen(first)==7 && strlen(second)==3) { strcat(digit,first); strcat(city,second); strcat(country,third); } cout<<"Country code …

Member Avatar
Member Avatar
+0 forum 4

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

I know this has been asked before, but none of the threads I found helped me much. I am a beginner at C++ programming and need help figuring out why this doesn't work. [B]Question[/B]: e^x can be approximated by sum 1 + x + x^2/2! + x^3/3 + ... + x^n/n! Write a program that takes a value x as input and outputs this sum for n taken to be each of the values 1 to 100. The program should also output e^x calculated using the predefined function exp. Use variables of type double to store the factorials or you …

Member Avatar
Member Avatar
+0 forum 5

hi , is there a soft that can convert a visual c++ project to c++ builder ??? I've tried a tool that comes with c++ builder but with no result . thanks

Member Avatar
Member Avatar
+0 forum 1

Hello, I was trying to implement data structures using file operations. I am using a data structure of two integers, one being the index number and other being the value. My actual aim is to recreate the file containing the data using a log. But, the program isn't running as required. Please help. I am giving the code: [CODE] ifstream rlist; rlist.open("redo.txt",ios::in); ofstream datt; datt.open("datatemp.txt",ios::out); dat c; char s; while(!rlist.eof()){ rlist>>s; if(s=='I'){ rlist.read((char*) &c,sizeof c); datt.write((char*) &c,sizeof c); } if(s=='D'){ ifstream rlistd; rlistd.open("datatemp.txt",ios::in); rlist.read((char*) &c,sizeof c); ofstream rlistdw; dat s; rlistdw.open("datatem.txt",ios::out); while(!rlistd.eof()){ rlistd.read((char *) &s, sizeof s); if((s.a)!=(c.a)) rlistdw.write((char*) &s, …

Member Avatar
Member Avatar
+0 forum 5

Hi, I am using Borland c++ builder 2009 and I want to make a graphical application for my project. I need a book that can teach me that. I searched the net but I always found book on version 5 which is over 10 years old. Does anyone know any updated book which I can use for borland. Cheers, Vishal

Member Avatar
Member Avatar
+0 forum 1

The End.