Hi guys, what I'm trying to do is allow the user to add a new student record to the system. If the user inputs a student ID already existing in the system, it doesn't accept the ID, but if it's a new student ID, it asks the user if they want to add the student to the system. When the user opts 'Y', it crashes! It's not supposed to! Here's the relevant code: [code] case 6://add a student record { int first = 0; int last = NUMRECS; int mid; int studentCount, newStdCourseCode, newStdCreditPoint; studentCount = NUMRECS; char decision3, option2, …

Member Avatar
Member Avatar
+0 forum 11

Hello guys, I've tried searching the internet on how to cout a struct in an array via a binary search, but with no success. I've only learned how to do a linear search and I sort of understand how to do a binary search but: how do I cout the found student record/ results of the search? Any help at all would awesome! I'm not so good with making functions but, my current whole code: [CODE]#include <iostream> #include <iomanip> #include <string> using namespace std; void clrscr() { system("cls"); } void pause() { system("echo.");system("echo.");system("pause"); } void displayMenu(string msg) { clrscr(); cout …

Member Avatar
Member Avatar
+0 forum 22

Hello guys, just wondering why my program crashes when I try to delete a struct from my array. I'm trying to code so that the user searches for a student via a student ID, then opt to delete the searched student's record. I thought I got it right and the search works fine, but it crashes when I opt to delete the student's record! I know it's due to the actual deleting part in my code. Here's my whole code: [CODE]#include <iostream> #include <iomanip> #include <string> using namespace std; void clrscr() { system("cls"); } void pause() { system("echo.");system("echo.");system("pause"); } void …

Member Avatar
Member Avatar
+0 forum 10

Hello guys, I'm trying to make it so that the user can opt to change student's course code or credit points (they can choose to change neither, either or both) in case 5 of my main switch statement. The problem is, the loop doesn't end after you choose to do anything! The search for a student works and the prompt works, but after that, it's just a neverending loop! Any direction or advice would be awesome! Here's my whole code (I've tried making functions for things as well, but I'm no good at it!): [CODE]#include <iostream> #include <iomanip> #include <string> …

Member Avatar
Member Avatar
+0 forum 8

This is my time to build a final year project. Am a UG Computer Science Student. Though I have 6 month to start my final year project, Am forced to submit the ABSTRACT of the project in a week or two. I tried in some search engines but am not satisfied with them. Many do the projects like Airline reservation, Library management, cryptography, blah..blah.. They are in use and no use of recreating them... :( [COLOR="Red"]I am with idea that I should do the project which no one has done so far and it should be useful to the society.[/COLOR]Suddenly …

Member Avatar
Member Avatar
+0 forum 7

I need to know how to pass the data's from database to a constructor like this "Jungle Book" => new Book("Jungle Book", "R. Kipling", "A classic book."), "Moonwalker" => new Book("Moonwalker", "J. Walker", ""), "PHP for Dummies" => new Book("PHP for Dummies", "Some Smart Guy", "") my coding is [CODE]$data = mysql_query("SELECT * FROM books") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { $title=$info['title']; $Author =$info['Author']; $Description=$info['Description']; $info['title'];=> new Book ($title,$Author,$Description); } [/CODE] but it's showing error like this [B]Parse error: syntax error, unexpected T_DOUBLE_ARROW in /opt/lampp/htdocs/mvc/model/Model.php on line 29[/B] i dono how to do can anyone suggest me how …

Member Avatar
Member Avatar
+0 forum 4

Hi Guys, I'm kinda new at this..but I need help cause I keep on getting this error and I don't know what's wrong with it. So Please Help Me. Thanks. Here's My Code: [CODE]#include <iostream> using namespace std; int addition (int,int,int,int,int, int); int addition (int a, int b, int j, int k, int l, int m) { int c; c=a+b+j+k+l; return (c); } int main () { int d; int e; int f; int g; int h; int i; cout<<endl; cout<<"Average Calculator"<<endl; cout<<endl; cout<<"Please input a number: "; cout<<endl; cin>>d; cout<<endl; cout<<"Please input another number: "; cout<<endl; cin>>e; cout<<endl; cout<<"Please …

Member Avatar
Member Avatar
+0 forum 2

The program is suppose to create and account but if the passwords do not match after the 3rd iteration it's suppose to output that its been too many tries and end the program... I can't seem to figure this out any help would be greatly appreciated. [CODE]while 3: print ("Welcome to yor account creation") name =input('Enter your name: ') pasw =input('Enter your password: ') paswr =input('Re-enter your password: ') if pasw == paswr: print ("Your account has been created") break; if pasw != paswr: print ("Please re-enter information") if while <=3: print ("Too many incorrect tries, your account has not …

Member Avatar
Member Avatar
+0 forum 4

[COLOR="Red"]help![/COLOR] i am now installing Windows XP on VM virtualbox,and i am now about to finish my installation until i get to midst on giving the product key. unfortunately, i lost the copy of my product key...huhuhuhuhuhu :'(:'( guys i need your suggestions..[COLOR="red"][QUOTE]is it okay if i close the running window of VM Virtualbox?[/QUOTE][/COLOR] ..will my laptop get harm?or have some damages??

Member Avatar
Member Avatar
+0 forum 3

Hey all so im a bit new to python and I need to create a select sort function without any for or whiles but this is all i have so far any help would be greatly appreciated. [CODE]def selection_sort(list): l=list[:] sorted=[] while len(l): lowest=l[0] for x in l: if x<lowest: lowest=x sorted.append(lowest) l.remove(lowest) return sorted [/CODE]

Member Avatar
Member Avatar
+0 forum 10

Hello I'm trying to make a random number generator to work out probability and chance, although it keeps coming up with an ArrayIndexOutOfBoundsException on line 41(roughly). I would be really greatful if you could help! thx p.s.This is not for school[code]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package randomiser; import javax.swing.*; /** * * @author Toby */ public class Main extends JFrame{ public Main(){ super("Randomizer"); setSize(500,500); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); String x = JOptionPane.showInputDialog("How many possablilities:"); String y = JOptionPane.showInputDialog("How many tries"); int poss = Integer.parseInt(x); int times = Integer.parseInt(y); int[] …

Member Avatar
Member Avatar
+0 forum 3

I have this method to see whether not the year is a leap year or not. heres the code i get the error missing return statement at the end. What can i do , i can't add return true or return false, becuase that screws it up. public boolean isLeapYear() { if(years % 4 == 0) { if(years % 100 == 0) { if( years % 400 == 0) return true; else return false; } } else return false; }

Member Avatar
Member Avatar
+0 forum 5

[B]Greetings![/B] Anyone here who can correct my code? I'm abit noob to PHP, just started learning. The Ban file function of mine does the echo but it wont stop the file upload. Any idea? have i inplented it wrong or do i miss a line? Love you long time if you correct it.. +1 ! [CODE]//Ban file if executable! $blacklist = array(".php", ".phtml", ".php3", ".php4", ".js", ".shtml"); foreach ($blacklist as $item) { if(preg_match("/$item\$/i", $_FILES['uploaded_file']['name'])) { echo "ERROR: Uploading executable files Not Allowed\n"; exit; } }[/CODE] Here is the complete script. [CODE]<?php // Check if a file has been uploaded if(isset($_FILES['uploaded_file'])) …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am a female computer science student, and I would like for someone to please review my flowchart for Flipping a Coin to see if it makes sense or check if I made any errors. [URL="http://i52.tinypic.com/24fgq6f.jpg"]http://i52.tinypic.com/24fgq6f.jpg[/URL] Also, if anyone could please help me get started on the pseudocode, because I seriously draw a blank when I look at flowcharts on what identifiers to use, etc. Any help is much appreciated, thank you.

Member Avatar
Member Avatar
+0 forum 1

I'm currently working on a recursive descent interpreter using C++. Though there is already a code on the project, I'm asked to rewrite the Recursive Descent Interpreter implementing it using a list class without using templates and facilites from the standard template library. I already worked through part of the code and I'm having a bit of trouble with finding a solution to an error. Here's the code. [CODE] //************************** interpreter.cpp *********************** #include <cctype> #include "interpreter.h" Iterator list :: begin() { } Iterator list :: end() { } Iterator list :: push_front() { } double Statement::findValue(char *id) { IdNode tmp(id); …

Member Avatar
Member Avatar
+0 forum 5

Hello, I started c++, and I recently got an assignment, which is supposed to calculate the sum, variance, mean deviation, and mean in a set. The user can input any number positive or negative for the set. Because it is a set, the person may enter as many numbers as they want. I have succeeded in making the program do addition and mean/average. I need help in coming up with a function which will make a variance, and then square root of that will give mean deviation. Use the following website to get the formula (online algorithm). The problem is …

Member Avatar
Member Avatar
+0 forum 3

[B]Please help... I need an algorithm for generate sudokus. i searched in the web, but there´s only algorithms in action scrip, java, c, c# or c++, i need it in scheme... why is so difficult find help for scheme expressions ´n algorithms?? if there someone who can give me a hand with it... thanks.[/B]

Member Avatar
Member Avatar
+0 forum 3

Hi! I am new to the world of coding, but am slowly learning. I am working on an internet scavenger hunt- so people search for a hidden icon on different sites all over the net. they are given a list of links to the sites participating and a riddle to help them find the right page on the site. What I need: I need to code the icons so when clicked the user is returned to my site and it logs that that icon has been found. This is the main thing I need to get done. If it is …

Member Avatar
Member Avatar
+0 forum 3

I have finished editing the program but I still have a couple of errors that I can't figure out, please help Errors: Error 1 error C2601: 'split' : local function definitions are illegal \\ilabss\home$\D03279277\Documents\Visual Studio 2005\Projects\err\err\err.cpp 97 Error 2 fatal error C1075: end of file found before the left brace '{' at '.\err.cpp(82)' was matched \\ilabss\home$\D03279277\Documents\Visual Studio 2005\Projects\err\err\err.cpp 137 [CODE]/* Specification: Gilberto Sotomayor-Candelaria Lab 7 Exercise 3 Append and display records in a address database*/ #include <iostream> #include <fstream> #include <string> using namespace std; void menu(void); void writeData(void); void readData(void); string * split(string, char); const char FileName[] = "c:/TestAddress.txt"; int …

Member Avatar
Member Avatar
+0 forum 3

I want to search a folder/directory on a client's computer when a button is pressed. Opendir seems to scan the path on the server and not the client. Can anyone confirm or deny this, and if it is possible how should I go about doing it?

Member Avatar
Member Avatar
+0 forum 2

I have this code and I am having trouble figuring how to make it run without any errors, can anybody give me some pointers on how to fix it [CODE]#include <iostream> #include <string> #include <iomanip> using namespace std; class TicTacToe { private: char theBoard [3][3]; public: TicTacToe(void); void playOneGame(void); void switchPlayer(char &); void showBoard(void); void postMove(int, int, char); char determineWinner(void); }; int main (void) { //test the class by playing one game TicTacToe Game1; Game1.playOneGame(); return 0; } void TicTacToe::playOneGame(void) { //start a game and play until someone wins or a draw occurs... const int MaxMoves = 9; char currentPlayer …

Member Avatar
Member Avatar
+0 forum 4

I'm really new to javascript how do I make it that when I click a button a number on my page in the <p> tag with the Id of num gets 1 added to it so it i like 2,3,4,5 each time I click

Member Avatar
Member Avatar
+0 forum 3

i have finished writing my program, but teacher want me to write a checkbook balancing program of a user's account. It has to use getline () to read a line, which will contain either the word "withdrawal" or "deposit". After reading each pair of line, the program should compute and print new balance. I think i need to declare a variable to hold the running balance. The program must warn when the user if the withdrawal exceeds the balance. *input should be somthing like this: 1.deposit 2.100 3.withdrawal 4.12.34 5.withdrawal 6.49.00 7.deposit 8.7.01 *OUT PUT of the program should print …

Member Avatar
Member Avatar
+0 forum 2

Ok, so I have an old Dell Dimension C300. It originally came with 128mb of RAM. I purchased 512mb x2, and made sure that it was "PC133U-333-542", and 133mhz - Just like the 128mb module that came with it. I installed the new RAM, and the computer turns on, but it says I only have 128mb of RAM still? Any help on this would be great - Michael

Member Avatar
Member Avatar
+0 forum 10

Friends, I'm taking a Java programming class online and it seems that the lecture nor the book explains in detail the finer points needed for my programs to work. Thus far, I've gotten by with what I know of prior languages and trial and error. However, I'm having problems with this driver class program and I need it finished by Friday and I can't get it to compile so I can see if the results it is giving me is correct. The problem centers around the "if statement" if (cat (this.age >= 3) && (this.declawed == false)and the print.out "get" …

Member Avatar
Member Avatar
+0 forum 6

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 a Header file that i will be using for multiple programs. this file specifies integers (its for my calculator programs). is it possible to have an integer value represented as AB if the two other integers are represented as A & B without getting a compiling error? EX. [CODE]short int a;[/CODE] [CODE]short int b;[/CODE] [CODE]short int ab;[/CODE] -- i want to know if this is possible please let me know be cause i have no space left since i am at [CODE]short int z;[/CODE].

Member Avatar
Member Avatar
+0 forum 3

I sure hope you can help me. I have reached the end of my tech expertise. I am having trouble connecting to the internet on my main computer (Dell XPS 400 running Windows XP and a Westell 6100 modem); I can get online through the wireless lan on my laptop which is connected via wireless Netgear Rangemax router. I finally removed a virus/malware that McAfee didn't stop (Microsoft Security Alert phony), so thought I did. In the process of removing it (thanks to Malwarebytes' Anti-Malware), files were removed and/or quarantined; those files apparently contained information that allowed the coputer to …

Member Avatar
Member Avatar
+0 forum 65

Hey guys, this is my first post here as I have been struggling with a problem with my internet for about two weeks now. I'll try to describe the problem in as many details as possible. I have a HP laptop with Windows Vista. Recently I moved to a new home and this [rented] home included a wireless network for me, it not being shared with anyone else. When I connect to the wireless network it tells me I have limited connectivity, or no connection at all. The weird thing is that once in every few days it will work …

Member Avatar
Member Avatar
+0 forum 4

[code]Dim MonPrice As Decimal If RadioBtnMon20.Checked Then TxBxPRICE.Text = TxBxPRICE.Text MonPrice = MonPrice + 120 ListBox1.Items.Add(RadioBtnMon20.Text) End If If RadioBtnMonHD.Checked Then TxBxPRICE.Text = TxBxPRICE.Text MonPrice = MonPrice + 140 ListBox1.Items.Add(RadioBtnMonHD.Text) End If If RadioBtnMonFullHD.Checked Then MonPrice = MonPrice - 140 + 170 ListBox1.Items.Add(RadioBtnMonFullHD.Text) ElseIf RadioBtnMoniterStand.Checked Then ListBox1.Items.Add(RadioBtnMoniterStand.Text) End If TxBxPRICE.Text = TxBxPRICE.Text + MonPrice[/code] i want to add only one price if selected but with this one if i choose another option then its keep adding price instead of removing previous price and put selected price.. can you help sove this pleasee thanxxx

Member Avatar
Member Avatar
+0 forum 9

The End.