Posts
 
Reputation
Joined
Last Seen
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
5
Posts with Downvotes
2
Downvoting Members
4
2 Commented Posts
0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
c++ x 9
c x 7
java x 1
Member Avatar for HBK_100

[CODE] private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: String sql="Select BADGE_NUMBER,FIRST_NAME from POLICE_TABLE"; try { Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance(); Connection con= (Connection) DriverManager.getConnection("jdbc:derby://localhost:1527/Traffic Ticket System","Administrator","admin1234"); /*As we are creating a connection on a local computer we will write the url as jdbc:mysql://localhost:3306 */ Statement stmt=con.createStatement(); ResultSet rs = …

Member Avatar for JamesCherrill
0
175
Member Avatar for HBK_100

[CODE] void RB_number() { int roomnumber; string category; string type; string status; float rate; int roomid; //Try,catch and throw statement for exception handling to catch errors that are inputed from the user try { cout<<"\n\n\t\t\tEnter the Room ID you wish to view:"; cin>>roomid; if(roomid < 0) throw "Error"; } catch(string) …

Member Avatar for daviddoria
0
106
Member Avatar for cbsinc

This compiles with no problem, but my calcCost function returns jibberish. I’ve tried many different combinations and I know it’s something simple. If I change my calcCost function to void and cout totalCost, it works fine, But I need the return value for another class (Order) that I need to …

Member Avatar for Taywin
0
113
Member Avatar for HBK_100

I have the following in the txt file [CODE] 1 Single.Standard Standard Empty ......... ........ 70 2 Single Standard Empty ........ ....... 70 [/CODE] I ahve the code below buts its not deleting the selected id [CODE] while(!file.eof()) { file >> roomnumber >> category >> type >> status >> datein …

Member Avatar for HBK_100
0
100
Member Avatar for HBK_100

I have a string array for example string name[5]={"A","B","B"} I am accepting an string input from a user and want to check it against that of the array. cout<<Enter letter; cin>>letter; if(toupper(letter)==name[0]) { ............ ........... } but i am getting an error

Member Avatar for HBK_100
0
85
Member Avatar for HBK_100

Why is this not reading from the file The contents of the file [CODE] 123456 James.Watson 234567 12.Clover.Crescent Spanish.Town St.Catherine Single Standard Passprot [/CODE] [CODE] ifstream file; file.open( "guest.txt", ios::in ); if ( !file ) { cerr << "File could not be opened" << endl; exit( 1 ); } guest …

Member Avatar for thelamb
0
87
Member Avatar for HBK_100

I have a file txt file with the contents [TEX]10031James Cameron2346789Spanish TownSt.Catherine12 Clover CrescentDeluxeSinglePassport[/TEX] I want to read from the file baesd on a seraching fro the id number and returning the datat to a class. But it seems I can't read from the file. Heres is the code below. …

Member Avatar for Lerner
0
152
Member Avatar for HBK_100

[code]#include <conio.h> #include <stdio.h> #include <windows.h> void display(void); void menu(void); int main() { char username[9]; int password=0,x=1; display(); do { printf("\n\t\t\tPlease enter your username:"); scanf("%s",username); printf("\n\n\t\t\tPlease enter your password:"); scanf("%d",&password); //problem if (username == 'udental' && password == 1987) menu(); else { printf("\n\n\t\t\t YOU HAVE MADE AN INVALID INPUT"); printf("\n\n\t\t\t …

Member Avatar for jonsca
0
104
Member Avatar for HBK_100

I am trying to read input form the user and then print them to a file but the compiler is giving me some error about invalid pointer at the fprintf statements [code]void addrecord(void) { struct custinfo info; FILE *customer; printf("\n\n\t\t\t PLEASE ENTER THE CUSTOMER INFORMATION BELOW"); printf("\n\n\t\t\t REGSISRTATION NUMBER"); scanf("%d",&info.regis); …

Member Avatar for WaltP
0
107
Member Avatar for HBK_100

[CODE]int main() { char username[9],username1[9]; char password [5],pass[5]; int y=1,i=0; strcpy(username1,"udental"); strcpy(password,"1987"); display(); do { printf("\n\n\n\n\n\n\t\t\tPlease enter your username:"); scanf("%s",username); printf("\n\n\n\n\n\t\t\tPlease enter your password:"); //problem/probelm while((pass[i]=getch())!='\r') { printf("*"); i++; } if (strcmp(username,username1)==0 && strcmp(password,pass) == 0) { Sleep(1000); system("cls"); break; } else { printf("\n\n\t\t\t YOU HAVE MADE AN INVALID INPUT"); …

Member Avatar for HBK_100
-2
84
Member Avatar for HBK_100

[CODE]#include <conio.h> #include <stdio.h> #include <windows.h> #include <string.h> #include <stdlib.h> void display(void); void menu(void); void dinfo(void); int main() { char username[9],username1[9]; char password [5],pass[5]; int y=1; strcpy(username1,"udental"); strcpy(password,"1987"); display(); do { printf("\n\n\n\n\n\n\t\t\tPlease enter your username:"); scanf("%s",username); //Right here i want to print out **** printf("\n\n\n\n\n\t\t\tPlease enter your password:"); scanf("%s",pass); if …

Member Avatar for Ancient Dragon
-3
841
Member Avatar for HBK_100

anyone knows how to use clearscreen with dev and how do you put like asterick in place of user input

Member Avatar for Ancient Dragon
0
63
Member Avatar for HBK_100

I seem to have trouble reading the input from the array [CODE]#include <stdio.h> #include <conio.h> #define ROW 1 #define COL 6 void printinfo(int[][COL],int,int); void findId(int[][COL],int,int); int sum=0; float avg=0; int main() { int info[ROW][COL]={0}; for(int x=0;x<ROW;x++) { printf("\nEnter the students ID number:"); fflush(stdin); scanf("%d",&info[x][0]); for (int y=0;y<COL;y++) { printf("\nEnter the …

Member Avatar for abhimanipal
0
99