132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Hyiero

[CODE] while(temp != NULL) { if(temp->info.Name == cName) { temp->info.DiscountNumber = temp->info.DiscountNumber + 5; flag = true; } if(temp ->info.DiscountNumber > 25) { temp->info.DiscountNumber = 25; // prev->link = temp->link; // delete temp; //temp->link = first; // first = temp; } //cout<<"Discount is :" //<<temp->info.DiscountNumber //<<endl; prev = temp; temp …

Software Development c++ linked-list
Member Avatar for Hyiero
0
735
Member Avatar for LianaN

Hello! My JTree is filled from DB. If I add a new node, and then try to delete it, then the code shown below provides an error. As I see, selectedFolder is sometimes null. Why does it happen? Why [ICODE]getLastSelectedPathComponent()[/ICODE] doesn't return a node selected, but returns null in some …

Software Development java java-swing
Member Avatar for quuba
0
225
Member Avatar for kyojin

I can't seem to get my access to the private xCoor and yCoor. I try couple of things i just learn in school but none of em make sense. Can someone explain and tell me a way to get access to those xCoor, yCoor, width, and height while still leaving …

Software Development java
Member Avatar for Ezzaral
0
183
Member Avatar for NotThereAnymore

I am trying an example from my CS class. We learned recursion recently, and one of the examples I was given was to reverse a given string. The Java program compiles correctly, but when it is actually executed, instead of getting the intended result, I get this as my outcome. …

Software Development java
Member Avatar for aspire1
0
587
Member Avatar for Awesomeness

I'm doing active rendering for a game, and I was wondering,,, Does drawing outside a canvas still use just as much CPU? As in, If I draw one rectangle, and then draw another outside the canvas, does it ignore the other rectangle, or waste CPU on it? I want to …

Software Development java
Member Avatar for Awesomeness
0
86
Member Avatar for Doshag

Hello there! I am new to Java and DW, though I usually find great help already here! Say I need a constructor that accepts [COLOR="red"]variable number of parameters[/COLOR] up to 2 parameters, but if I pass only one parameter to this constructor, both parameters will take this number, and if …

Software Development java
Member Avatar for Doshag
0
177
Member Avatar for rebellion346

This is a program my instructor wrote and I have to create a program that similar in format. My issue is I don't quite understand what main is doing or how it works, was hoping someone could explain it to me in detail. Rolodex.h [CODE] #ifndef _ROLODEX_H_ #define _ROLODEX_H_ #include …

Software Development c++ file-stream ios
Member Avatar for Shantari
0
531
Member Avatar for aznlitomik3

I need some help on the void plusEquals/minusEquals and etc function I'm not sure how to start it Please can anyone help me do the plusEquals function so I know what I'm suppose to do or maybe some guides on how to approach it Below the problem is my current …

Software Development c c# c++
Member Avatar for aznlitomik3
0
1K
Member Avatar for hwalsh

Hi, I've been working on this for two days. I need to pass an arraylist to another class. It gets the information, and will print out the menu, until the program goes back to the initial class, then the list empties. I don't get it, and I'm so confused. [CODE]public …

Software Development java oop
Member Avatar for hwalsh
0
7K
Member Avatar for Thropian

I making a game that would use multiple canvases drawing on one canvas then switching to another... is there any way to get a new canvas and be able to restore the old canvas with the drawings still on it?

Software Development html-css python tkinter
Member Avatar for Thropian
0
202
Member Avatar for Fbody

I'm really intrigued by OOP, I feel that I can help most people with OOP questions reasonably well, but I still have a lot to learn and there's something that bothers me. What is the best way to write the program's main() if I want to create a truly OOP …

Software Development c++ oop
Member Avatar for Fbody
0
161
Member Avatar for Kieran Y5

Hi, Is it possible to write and compile a cross-platform C++ Program in Visual Studio (C++) Express or Professional? I only ask this question (before starting on a big project) because I would like to support other platforms without changing my coding environment, if you get what I mean. Kieran …

Software Development c++ visual-studio
Member Avatar for Kieran Y5
0
190
Member Avatar for LianaN

Hi! I want to delete an empty directory from FTP Server, however my code works only for files. Let's say the root directory in my FTP Server is called as [ICODE]Documents[/ICODE]. I want to delete a directory [ICODE]Director[/ICODE]. Then I execute [ICODE]client.deleteFile("\\" + selectedPath);[/ICODE], where [ICODE]selectedPath[/ICODE] is equal to [ICODE]Documents\Correspondence\Finance\Director[/ICODE]. …

Software Development client-server finance java
Member Avatar for LianaN
0
839
Member Avatar for LianaN

Hi! How should I change the TableModel that extends AbstractTableModel to allow displaying empty data sets? Should the getValueAt method be chaged as follows? [CODE] public Object getValueAt(int row, int col) { Object str = ((Object[]) cache.elementAt(row))[col]; if (str != null) return str; else return ""; }[/CODE] ...or something else …

Software Development java
Member Avatar for quuba
0
1K
Member Avatar for LianaN

Hi! how could I delete all spaces in the string: [ICODE]String str = "AAA BBB CCC";[/ICODE] in order to get "AAABBBCCC" as a result? The following doesn't work: [ICODE]str.replaceAll(" ", "");[/ICODE] Thanks!

Software Development java
Member Avatar for LianaN
0
176
Member Avatar for mbouster

Dear all , I need your help on this. I will say how I am thinking the solution and any help will be much aprreciated. I will denote the husbands with the following notations h1 = 11, h2=12, h3=13 and their respective wives with the numbers w1 = 21, w2 …

Software Development c++ legal linked-list puzzle
Member Avatar for mbouster
0
2K
Member Avatar for knellgust

[CODE]#include <iostream> #include<string> using namespace std; class Book { private: string title; double price; public: Book(); void setTitle(string s); void setPrice(double p); string getTitle() const {return title;} double getPrice() const {return price;} bool hasKeyword(string key); }; Book::Book() { title="None"; price=0; } void Book :: setTitle(string s) { title=s; } void …

Software Development c++
Member Avatar for alaa sam
0
182
Member Avatar for pavank75

hi i got one problem to solve am almost did but facing problem for my last for loop iteration can any one help me this is the problem i received University of Newcastle School of Electrical Engineering and Computer Science SENG1110/6110 Programming Assignment 1 – Semester 1, 2010 Due: By …

Member Avatar for jon.kiparsky
0
194
Member Avatar for Alex86fire

Hey guys, I have a problem I can't seem to figure out properly: I have to implement a mirror in a java applet. For the mirror I used a second window. what I don't know: -how to rotate the second window -how to make it mirror what's in front of …

Software Development java
0
146
Member Avatar for nejger

Hello! Now I have written a function for numbers over 3999: if arabicnumber<=3999: print arabToRom else: parenthesis=0 while (arabicnumber)>3999 arabicnumber/=1000 for i in range (parenthesis... etc and i compare all the numbers that i write in so if i write like 5560 it pirints out ( V ) and the …

Software Development python
Member Avatar for woooee
0
109
Member Avatar for GaBack

Hi I have a saved file like: name - item1 - item2 -item3 name - item1 - item2 -item3 so on .... Now i want to get like item1 to display in combobox. How can i do it?? Thx

Software Development
Member Avatar for Mitja Bonca
0
121
Member Avatar for Cragsterboy

okay guys im really stuck on this and i need help badly. All i know is that i need a loop at the begining to ask for four different marks, these marks have to be between 0-100. the marks are then stored in array and then i do a sum …

Software Development assembly
Member Avatar for Cragsterboy
0
100
Member Avatar for Anthony Cameron

Hello, I am parsing a rebase file and using different subroutines from the BeginPerlBioinfo module. I have used the subroutines I think I need but I keep on getting the message"use of initialized value $site in concatenation or string <$fh>. [CODE]use strict; use warnings; use P4; # Declare and initialize …

Software Development file-system perl
Member Avatar for Anthony Cameron
0
208
Member Avatar for Hawkeye Python

Hi! I'm new at python and I don't get the while statement. I'm trying to make a simple function that returns each term of a geometric progression 'til 'n'. [CODE]def gp(a1,r,n): while not n == 0: n = n - 1 an = a1 * (r ** n) return an[/CODE] …

Software Development python
Member Avatar for Hawkeye Python
0
150
Member Avatar for Mattan360

Hi! I'm making a program that uploads my game to an Ftp server but when the data is compressed something goes wrong and I end up with an array of zeroes. Here's my code: [CODE] FileStream filestream = File.OpenRead(file); byte[] filebyte = new byte[filestream.Length]; filestream.Read(filebyte, 0, filebyte.Length); filestream.Close(); //MemoryStream inS …

Software Development file-stream
Member Avatar for Mattan360
0
100
Member Avatar for Vexx

Hello folks, For my final project I decided to write an online poker game. Long story short I'm having trouble with a class I wrote to manage java.net.Sockets. The source for this class is: [CODE] import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.util.Iterator; import java.util.LinkedList; public …

Software Development java open-source
Member Avatar for Vexx
0
471
Member Avatar for Sarafyna

Hey all. I find myself having some issues with parent and child communication. What I have been asked to do is create a MDI program with many children. I was able to get that part working great but then the kicker was brought in that the if the focus changes …

Software Development
Member Avatar for Sarafyna
0
146
Member Avatar for Binika

I would really need some help :( Write a recursive method, as a parameter to accept the folder name (absolute or relative to the current folder) that prints lists of all the files and all folders in the folder, which is given in parameter, and displays all folders in all …

Software Development python
Member Avatar for TrustyTony
0
217
Member Avatar for BLUEC0RE

**CHANGE PANELS IN TITLE TO Grid Layout I first want to apologize for filling the board with a noob question but I don't know how to phrase my question on google. So here we go! My prof has us working on GUI programming. I am trying to split up my …

Software Development gui java java-swing
Member Avatar for BLUEC0RE
0
89
Member Avatar for seryoga

Ive been trying to make a program that should keep the status of a hotel room layout. main method should return this: [url]http://img202.imageshack.us/img202/969/layoutview.jpg[/url] the cells should also be painted green if they are available for renting Yellow if they are booked or red if the are not available one class …

Software Development java
Member Avatar for Gerbiler
0
81
Member Avatar for evertron

I tried this class a couple of different ways and I had it print just memory location I think one way now I have an error that says: Traceback (most recent call last): File "F:\Python_Stuff\CSC143-901\Lexicon.py", line 83, in <module> source = Lexicon.OpenFile('word') TypeError: unbound method OpenFile() must be called with …

Software Development file-system open-source python
Member Avatar for evertron
0
236
Member Avatar for nepkancha

hello all, i am new here ,, and i need some help to do this array problem.. i can't figure it out.. any help will be greatly appreciated.. here is the question: [B]1- define an array of size 100 of integers, and fill it with random numbers between 1 and …

Software Development c++
Member Avatar for WaltP
0
119
Member Avatar for aramesh1989

hi everyone i am working on internet banking project. I have an little idea about the project what are the functionality to implement and I am not perfect in web technologies. But I'll work hard on this project. My major problem is I am not getting where to start it …

Software Development java
Member Avatar for masijade
0
120
Member Avatar for crisabraham

An error called outofmemory error is coming up when I am giving nums value > 1. I have underlined where num comes. The strings bla1, bla2 etc, I gave for identifying the error. private void generateMouseClicked(java.awt.event.MouseEvent evt) { String s = new String(); String o = new String(); boolean check …

Software Development java
Member Avatar for jon.kiparsky
0
104
Member Avatar for Blenor

hai just made this code and i look through it many time.. i cant figure out why it isint woking.. any suggestions ? [CODE]#include<iostream> using namespace std; int main(); { system ("TITLE calc"); system ("COLOR 5"); char cChar; double dfistnumber; double dsecondnumber; char cDoagain; do { system ("CLS"); cout << …

Software Development c++
Member Avatar for alaa sam
0
146
Member Avatar for Hassan.shah

hi need to write a program to read or write data to PLc by rs232 using modbus protcol how can i do it Thanks in Advance

Software Development c c# c++
Member Avatar for daviddoria
0
137
Member Avatar for Forte1292

Hello all. I'm creating a checkers program using C++. My board and pieces all display fine and everything works smoothly after pieces move and jump. The only problem is that after 12 successful moves it cuts off every time and I can briefly read something like BGI graphics error or …

Software Development c++
Member Avatar for Mehwish Iqbal
0
161
Member Avatar for MaC-CK

Good morning, I'm learning some basic programming and fundamentals and I am having a hard time troubleshooting why a certain part of my code is not working. In my "calcTotal" function, my If, Else statements do not seem to be working. The program runs through, but the output is always …

Software Development python
Member Avatar for MaC-CK
0
135
Member Avatar for XxPKMNxX

I have written a piece of code, everything is fine until i run it, i get [CODE]"Exception in thread "main" java.lang.NullPointerException at useCADSL.main(useCADSL.java:5)"[/CODE] i know what it means, i just cant see where to modify [probably the whole you read what you think you've wrote thing] my first class is …

Software Development java puzzle
Member Avatar for JamesCherrill
0
235
Member Avatar for sadsdw

Hi friends, I'm having problems to use 2 consecutive "cin.get()". The second get() is not been accessed. But if debug I can answer the name of second file. Can you help me? Cheers, Sads [CODE]cout << "\nEnter the name of the first FILE : " << endl; cin.get (FileName1,256); cout …

Software Development c++
Member Avatar for sadsdw
0
98
Member Avatar for ChrisXL

Hi everyone, I know you probably see a hundred of these during this time of year, but I have a project going at uni that requires us to create a string based hangman game from scratch. It's not anything fancy, and the game itself isn't too complicated, but where I'm …

Software Development java
Member Avatar for Gerbiler
0
145
Member Avatar for Mr_PoP

hi there [CODE] #include "stdafx.h" #include <iostream> #include <mysql.h> int _tmain(int argc, _TCHAR* argv[]) { MYSQL *con; mysql_real_connect(con, "localhost", "alakazam","username","password",0,NULL,0); } [/CODE] Error IntelliSense: identifier "SOCKET" is undefined in file mysql_com.h how should i fix it?!!

Software Development c++ mysql
Member Avatar for daviddoria
0
75
Member Avatar for skorm909

So i haven't been coding in awhile and i just decided to try and make a game again. nothing fancy just a simple text rpg. here's my code so far there's a few errors and if you know how to fix them that would be great... also i have some …

Software Development c c# c++
Member Avatar for alexchen
0
94
Member Avatar for Jagfarrell

HI all, Normally I've been lucky to find someone who has had the same problem and applied their solution but after hours of searching I'm not able to find a solution to this one. I've got a FormView which is default mode set to Insert. When the page is loading …

Software Development session vb.net
Member Avatar for Jagfarrell
0
154
Member Avatar for alexchen

"Why does this not compile?" [CODE]int main(){ struct people{ char name[20]; short age; } people; struct people me; cout<<"Write your name"<<endl; gets(me.name); cout<<"How old are you"<<endl; gets(me.age);//error }[/CODE]

Software Development c
Member Avatar for alexchen
0
136
Member Avatar for rain.divine88

Hi all, I need a help from you. I'm writing a c++ console program that only accept only positive number. If the user enter an invalid number like negative and string, I want to display like [CODE]cout << "Enter a number";[/CODE] I want to loop this message until user enter …

Software Development c++
Member Avatar for Shankye
0
160
Member Avatar for di.miller

Hi, I am using VB 2008 Express to connect to an Access 2007 database. I have a combo box called SelectYearMonth that is populated by the database. When I used the Access report VBA, I used the AfterUpdate() event to calculate a sum. I need to know how to do …

Software Development vb.net
Member Avatar for di.miller
0
793
Member Avatar for sadsdw

Hi friends, I'm newer in C++ and I'm trying write a code using ifstream, vector and substr. A) I have 2 problems: A.1) When I read files with small number of lines OK, but if I increase the number of lines, PROBLEM. As example: file1.txt (Work well with 9 lines, …

Software Development c++
Member Avatar for daviddoria
0
199
Member Avatar for GURU1349

I'm a beginner in C++. I'm not studying it so I don't have a teacher and I don't have a book, a guide. The Internet is my only guide. Well here's my program: [CODE]#include <iostream> #include <math.h> using namespace std; int main () { int q; float x,y; Baslangic: cout …

Software Development c++
Member Avatar for GURU1349
0
127
Member Avatar for DaveTran

I have a simple class that creates unique ID numbers: [CODE] public static class ID { private static int iD = 0; public static int GetNextID() { return iD++; } } [/CODE] If I want each instance of an abstract class to automatically get a new non changeable ID when …

Software Development
Member Avatar for Mitja Bonca
0
87

The End.