132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for niggz

Hello! I have a little problem. I don't understand how to solve this issue: Object reference not set to an instance of an object. Thank you! This is my code: [code=c#] BindingList<ComboBox> cmbPlayers = new BindingList<ComboBox>(); Club[] league = new Club[10]; // league contains class Club // class Club contains …

Software Development
Member Avatar for niggz
0
289
Member Avatar for KSBeyaz

Hey guys i m trying to make hangman game as java application here is a simple run how it should be. [url]http://e.atilim.edu.tr/mod/resource/view.php?id=5240[/url] i m trying to put JLabels in order when player click correct buttons. firstly i added JFrames at first then i did setEnabled(false) them after button is clicked …

Software Development apache java java-swing
Member Avatar for KSBeyaz
0
244
Member Avatar for Ich bin würdig

Does someone know how to integrate a collection of programs as one whole program? Thanks. :)

Software Development c
Member Avatar for Smeagel13
0
97
Member Avatar for xiangzhuang

Hey guys, so this is what happened. I'm stuck on this project on the second part, which is the top right quadrant. Its not showing the graphics at its specified quadrant which is the top right. Its supposed to have randomized sized red blocks that fills the quadrant. Can you …

Software Development java java-swing
Member Avatar for hfx642
0
399
Member Avatar for zeroliken

Here is a complete and working code that 1. Adds the numbers(input) to get a sum(output) 2. Sorts the numbers in a descending order Can you post any suggestions on how I can improve my code :) main.c [CODE]#include <stdio.h> #include "header.h" main (){ int sum, x, y, z,choices; input(&x, …

Software Development c
Member Avatar for Narue
0
237
Member Avatar for LondonJava

I want to attach User Instructions to a Java application, and allow the user to open it from the help menuitem. I'm not very familiar with classpath variables. If I use an absolute path name everything is fine, such as File pdfFile = new File("C:/Program Files/MyProgram/UserGuide.pdf"); But I want to …

Software Development ide java pdf
Member Avatar for hfx642
0
509
Member Avatar for meandmyipod

I'm having troubles with the following code [CODE]#include <stdio.h> #include <ctype.h> int main (void) { int i=0,j=0,row; char str1[5], str2[5]; char machine[4][5]={0}; FILE *fp; fp = fopen("text.txt","r"); while (fscanf(fp,"%s %s",&str1,&str2) == 2 ) { row = str1[1]; while (str2[i] != NULL) { machine[row][i]=str2[i]; i++; } } for (i=0;i<5;i++) for (j=0;j<5;j++) …

Software Development c file-system
Member Avatar for Narue
0
116
Member Avatar for km2011

i have problem about the output in this code, my output so only the index 0. how can i fix this. [code] public class d_2D { static double[][] d =new double[6][4]; static double[][] e= {{}, {0.0,0.6,0.0,0.0}, {0.0,0.2,0.5,0.1}, {0.0,0.2,0.5,0.4}, {0.0,0.2,0.5,0.7}, {0.0,0.0,0.0,0.9}}; static double[] avg= new double[4]; static double[] sum= new double[4]; …

Software Development java
Member Avatar for km2011
0
175
Member Avatar for theCompiler

i need to insert a character on a string . for example input is : cafe the output should be caxzfe . i insert xz . i just know how to concatenate two strings but when inserting a character in a string im totally lost .

Software Development c
Member Avatar for Narue
0
95
Member Avatar for Wootens

hey guys, I'm writing a program and trying to output data to a file and I'm getting this error: 1>------ Build started: Project: GenericProgram, Configuration: Debug Win32 ------ 1> Source1.cpp 1>c:\program files (x86)\microsoft visual studio 10.0\vc\include\fstream(1116): error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>' 1> with …

Software Development c++ ios microsoft-access visual-studio
Member Avatar for vijayan121
0
161
Member Avatar for Muhammad Anas

Question: Write a single statement that chooses a random number from each of the following sets: a) 2,4,6,8,10 b) 3,5,7,9,11 c) 6,10,14,18,22 I wrote the following statement for the set (a): [CODE](1 + (rand() % 5)) * 2;[/CODE] but I am unable to write ones for sets (b) and (c). …

Software Development c++
Member Avatar for Muhammad Anas
0
3K
Member Avatar for Asotop

Hey! I'm currently at the end of a task im working on, which consist of a class named CD, and in the main program i got a method which register a CD. And i want the created class to be named CD1, CD2 etc. [CODE] public static int cdNumber = …

Software Development
Member Avatar for Asotop
0
339
Member Avatar for asif123

hi every body i m doing project of hand gestures detection using open cv .so pls guide me how i detect hand from video .

Software Development c++ video
Member Avatar for asif123
0
166
Member Avatar for trantran

Here is my problem: 1) I have a tree which I want to act upon some branches indepedantly and simultaneously by different threads 2) The program is structured so that the processing of each branch is isolated after the main "manager" thread delegates the work to different thread: memory of …

Software Development c++ storage
Member Avatar for jmichae3
0
312
Member Avatar for The 42nd

Hi. I have trouble with getting the following program to convert string to float type. What i need to do is this: 12.345e3 = 12345 12e-2=0.12 -12.34=-12.34 -12.34e3=-12340 -12.34e-2=-0.1234 e: = x 10^ I got it to do the basics. However, It doesn't work in case of negative numbers or …

Software Development c
Member Avatar for TrustyTony
0
2K
Member Avatar for atiyehjoon

hello my dear friends I have read a book that was simple to learn c++,recently But in operator ovorloading threads ,I dont underestand many example for ovoreloading in another books & booklets for example : in the example below 1 // Fig. 11.3: PhoneNumber.h 2 // PhoneNumber class definition 3 …

Software Development c++
Member Avatar for mike_2000_17
0
217
Member Avatar for rockerjhr

How do I define a function that reads a sequence of values from an input stream that is passed as an argument?

Software Development c++
Member Avatar for nuclear
0
161
Member Avatar for Unsated

Hello everyone and thanks in advance for helping me. I'm a 1st year java student in my first semester of college. Its comming towards the end of the semester and finals are starting up.. well my problem is that my java teacher decided to give us 2 projects to work …

Software Development gui java java-swing
Member Avatar for Unsated
0
373
Member Avatar for Jessurider

can anyone tell how to bring Bitmap class in java just like we do that in C#................ i've got link regarding the Bitmap class in java... but i does'nt know how to bring that in java [URL="http://jwx.sourceforge.net/api/wx/Bitmap.html"]http://jwx.sourceforge.net/api/wx/Bitmap.html[/URL]

Software Development api java
Member Avatar for Jessurider
0
213
Member Avatar for harish13

i want to convert a file from text format to binary format using VB how can i achieve this

Software Development visual-basic xml
Member Avatar for arthu rias
0
369
Member Avatar for jhamill

So I wrote up a simple voting GUI, but I havent been able to figure out how to get it to display the current leader or how many votes they have. It displays the total number of votes correctly, however. Heres my code [CODE]import java.awt.*; import java.util.*; import java.awt.event.*; import …

Software Development gui java java-swing
Member Avatar for harinath_2007
0
195
Member Avatar for coolbeanbob

Hey everybody, I am still pretty new to programming. I am not getting a compiler error here, but I can't figure out what the problem is. I get the message "an unhandled win32 exception occured [1576]" It seems like some type of overflow in the insertion_sort function. I am still …

Software Development c++
Member Avatar for coolbeanbob
0
121
Member Avatar for Dakot

I'm trying to solve this exercise. Write a program that print out the following, user will input the top number: ***** **** *** ** * i made a program similary to this , but user inputs the bottom number ,the output is like this: * ** *** **** ***** here …

Software Development c c# c++
Member Avatar for Dakot
0
84
Member Avatar for Vasthor

hope anyone can help something with this code, well this code for the exercise 3.4 in Accelerated C++ book... where 3-4. Write a program to report the length of the longest and shortest string in its input. I thought my code was gonna going good, but it seems that it …

Software Development algorithm c++
Member Avatar for Vasthor
0
156
Member Avatar for coolbeanbob

Hello, I am trying to add integers to a two dimensional vector. My problem is on line 26. I know this is how you would add the data to an array, but how do you do this for a vector? Also, is it true you cannot pass an array to …

Software Development c++
Member Avatar for VernonDozier
0
176
Member Avatar for desolatebeast

Hi there, I'm trying to create a complex number class in c++ and have hit a snag. I have searched the forums here for an answer and have tried to google it, but still wasnt able to figure out what is wrong. I am fairly new to C++ so yeah. …

Software Development c++
Member Avatar for morganJohnson
0
347
Member Avatar for nyfan68

Having a little trouble with this problem. Keep getting a compiler error which says there is no match for my operators when I run the test program Create a class called Rational for performing arithmetic with fractions. Write a driver program to test your class. Use integer variables to represent …

Software Development c++
Member Avatar for Schol-R-LEA
0
2K
Member Avatar for techlawsam

Ok So Im writing a app which would pick the 'cheapest' plan for a consumer. While writing this I came across something puzzling to me. Why is it starting after the default constructor, the first CellPlan has three arguments passed too it and then the next one two and then …

Software Development oop
Member Avatar for techlawsam
0
189
Member Avatar for rohan121212

#include<IOSTREAM.h> main() { int rohan=0; int m=10; int l=10; int t=10; int flag1 =0; int flag=0; int temp; float temp1; long double n; double k; cout<<"ENTER N\n"; cin>>n; k=n; int camp; camp=k; while (flag1) { l*=10; camp/t; t*=10; if (camp == 0) {flag1=1;} } if ((1>n)&&(n>=1e6)) {cout<<"there is a error";} …

Software Development c++
Member Avatar for morganJohnson
0
163
Member Avatar for Octet

I am having problems with a simple file I am trying to create. The idea of the file is to use a header to read something from the file and then call this in the main.cpp This is my Main.cpp file: [code] #include <iostream> #include <string> #include "Menu_Screen.h" using namespace …

Software Development c++
Member Avatar for Ancient Dragon
0
1K
Member Avatar for MakingMoney

I've been asked to write a program that computes the nth Fibonacci number where n is a value input by the user. For example, if n = 6, then the result is 8. This is what I have so far: def main(): print "This program will compute nth Fibonacci" print …

Software Development python
Member Avatar for TrustyTony
0
2K
Member Avatar for mike2828

i am getting an error : java:10: error: AniWorld is not abstract and does not override abstract method mouseMoved(MouseEvent) in MouseMotionListener public class AniWorld extends Applet implements MouseMotionListener, MouseListener please help [CODE]import java.awt.*; import java.lang.*; import java.applet.*; import java.net.*; import java.net.MalformedURLException; import java.applet.Applet.*; import java.io.IOException; import java.awt.event.*; public class AniWorld …

Software Development java
Member Avatar for mike2828
0
109
Member Avatar for Kyle Willett

I need help with a programing assignment for my CS 2 class, the task is to check rather a user inputted string is a palindrome meaning it is the same forwards as it is backwards. I have most of the program working, I input a string then copy it and …

Software Development c++ mathematics
Member Avatar for frogboy77
0
267
Member Avatar for rjstamey

I am having a problem with my program not reading the OR statements right. [CODE] do { blah blah blah }while(y!=1||y!=2); [/CODE] I have also used it as this format, ((y!=1)||(y!=2)) The program is marking it as true and keeping me stuck the loop even though y is == 1 …

Software Development c++
Member Avatar for rjstamey
0
106
Member Avatar for sandman64

What i need it to is write a GUI program that has one text field, one button, and one text area. The user can enter data into the text field, and then click the button. When the button is clicked, the program records the value in the text field to …

Software Development file-system gui java
Member Avatar for Aviras
0
2K
Member Avatar for asif49

I have to do this project in which several employees need to be added to the system. The system admin should be able to allocate jobs that each of those employees will be doing after verifying whether that job is already attached to the employee or not and whether that …

Software Development java
Member Avatar for asif49
0
161
Member Avatar for sofia85

Hi,I was wondering how to read and write strings in python. I have this code where I'm creating a path, but its a string, and now I want to write to this string. But keep getting this error message [I]AttributeError: 'str' object has no attribute 'write'[/I] I was thinking about …

Software Development python
Member Avatar for Gribouillis
0
236
Member Avatar for Cheese7

Hey, I'm new to Python programming and I've been making a simple rock paper scissors program for practice. I've managed to get it working; it asks the player to enter 'a' for rock, 'b' for scissors or 'c' for paper. If the player entered a, b or c, a number …

Software Development python
Member Avatar for Cheese7
0
155
Member Avatar for Leprechaun6

My assignment is to basically design a set class that creates a "set" of any data type and is able to perform basic functions. It needs to use an array to store it's elements and operate like a C++ set, meaning no duplicates. I need to be able to add …

Software Development c++
Member Avatar for Leprechaun6
0
176
Member Avatar for clorofaysal

hello everyone, can anyone suggest me any software that is portable in pen-drive and c++ program can run in pen-drive.

Software Development c++
Member Avatar for cossay
0
142
Member Avatar for lbgladson

I have the following program to reduce rational numbers but am getting error messages at the lines x = c.subtraction( d ); and for multiplication, addition and division that says no operator "=" matches these operands. I do not know why. Could someone please help? [code] class Rational { private: …

Software Development c++
Member Avatar for Schol-R-LEA
0
6K
Member Avatar for WigglesMcMuffin

I'm trying to create a program that'll read a list from an external file, and generate an arrayList with the object representation of the list. Basically, the list contains names, and prices, which will be read in, and used to create instances of my "book" class which are supposed to …

Software Development java
Member Avatar for WigglesMcMuffin
0
256
Member Avatar for MoldingHam

My professor wants the following: 1. Write a program to correct a text including several paragraphs a. The first line in each paragraph must be indented b. The first character in every sentence must be capitalized, paragraphs will be indented with "CRLF" code c. Initial text and output must be …

Software Development vb.net
Member Avatar for codeorder
0
121
Member Avatar for r_k_k

how do i store the data from the partData file and find if the order was successful?????? is this program correct???????? #include <stdio.h> #include <stdlib.h> #define MaxWordSize 1000 /*Part Number = PartNume Selling Price = SP Quantity in stock = QtyInStock Order Number = OrderNum Quantity requested = QtyRequested partData …

Software Development c++ file-system
Member Avatar for WaltP
0
223
Member Avatar for renzlo

Hi All, I am currently creating a merging program which is processing multiple text files with header. I've manage to merge the text files but I'm stucked with the header that needs computation. path of input files and header explanation: [URL="http://uppit.com/a0nv880qb5uu/text_files_and_explanations.zip"]Input Files[/URL] After merging, I need to put back the …

Software Development vb.net
Member Avatar for Reverend Jim
0
256
Member Avatar for lbgladson

I am trying to use a combo box to change the background color. I have the following code but it is not working correctly. The combo box is there with the three choices but the choices are not changing the color of the background. [code] import java.awt.BorderLayout; import java.awt.Color; import …

Software Development java java-swing
Member Avatar for Ezzaral
0
105
Member Avatar for Vermouth

I want to make a table like this: Seq. Name Class Seat VIP? Mileage(km) ==== =============== ===== ==== ====== ========== 1. Peter B 5A VIP 1046km 2. David F 1A VIP 2150km ...... Do I need to use for loop, strncpy to do so? Or do I need to use …

Software Development c++
Member Avatar for WaltP
0
141
Member Avatar for jlake

i need to use function but i think my card value and calculate hand functions are not working right. not sure what to do. [code] #include <iostream> using namespace std; void instructions ( ); void input (int& number_of_cards, char& card_value1, char& card_value2, char& card_value3, char& card_value4, char& card_value5); int calculate_hand …

Software Development c++
Member Avatar for WaltP
0
207
Member Avatar for zhanrah

Please help me fix my code.. It works in CodeBlocks but when I try in Linux, it says it has an error - SEGMENTATION FAULT (core dumped) :( This program converts between bases of a number. After it converts a number it should go back to start to get input …

Software Development c
Member Avatar for Moschops
0
207
Member Avatar for ram619

Hi, in the below given program the answer is 1. agpur 2. jabalpur 3. jabalpur I understood the processing for the first two printf statements but for the last printf statement I could not understand the processing. Could anyone please explain. Thanks in advance :) [code=c]#include<stdio.h> #include<conio.h> void main() { …

Software Development c
Member Avatar for ram619
0
92

The End.