132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for wolfkrug

I am converting a console IO program to a file IO program. The program worked perfectly as a console IO. I thought I made the appropriate changes to the program. It compiles, and when I run it output does go to my output text file, but the output is the …

Software Development c++ file-system
Member Avatar for WaltP
0
183
Member Avatar for spursfan2110

Hi everyone, I'm kind of stuck, is this the correct notation to compare a char to double quotes? variable == "\""

Software Development c
Member Avatar for spursfan2110
0
155
Member Avatar for iammirko

Hi, I have used the following code (this is from HeadFirst Java Book) [CODE] import java.awt.*; import javax.swing.*; import javax.sound.midi.*; import java.util.*; import java.awt.event.*; public class BeatBox { JPanel mainPanel; ArrayList<JCheckBox> checkboxList; Sequence sequence; Sequencer sequencer; Track track; JFrame theFrame; String[] instrumentNames = {"Bass Drum", "Closed Hi-Hat", "Open Hi-Hat", "Acoustic …

Software Development java java-swing
Member Avatar for gangsta1903
0
152
Member Avatar for squarey

Hi guys I use the following code to check if a user has specified a certain argument: [CODE]if (strcmp(argv[i], "-i") == 0) { // do something }[/CODE] I use the following code to check whether any arguments have been specified (e.g. -i test1) but it gives me a segemtation fault …

Software Development c++
Member Avatar for strmstn
0
69
Member Avatar for mani_singh

i am trying to make a program where a user inputs two numbers. the first number needs to be less then the second. then the program needs to add all the numbers together that fall between those two numbers including the two numbers. for example number1 = 1, number 2= …

Software Development c++
Member Avatar for WaltP
0
255
Member Avatar for Japus

Hello I would like to make some kind of download manager that you can feed a file of links which it would then download. I can make it work for one at a time but it takes like forever to do them all and my internet connection isn't fully used …

Software Development shell-scripting
Member Avatar for toto10
0
81
Member Avatar for donelliewhyte

IF i write to file REGISTRATION NUMBER :1001 how can read back from the file the 1001. Thank you for all your help,i have gotten other hints but they don't seem to work

Software Development c
Member Avatar for jephthah
0
78
Member Avatar for ceyesuma

Could someone tell me what has to be changed to get the element name and text of my targetElement? I just get internal frame openFrameCount= 1 start obj() type= guide cmaj name: null value: null name: null value: null name: null value: null cmaj name: null value: null name: null …

Software Development xml
Member Avatar for ceyesuma
0
94
Member Avatar for Phloxicon

I need to find how long it takes to execute a bunch of code. I've tried using clock() but it's just not accurate enough for the small functions (it says 0 cycles have passed). I heard of gprof but that only seems to be for Linux. The version of Visual …

Software Development c++ visual-studio
Member Avatar for Phloxicon
0
81
Member Avatar for xschecterx

Hello, I'm trying to print out on the screen the the sum of a perfect number, and i can't quite figure it out how to code it. For example I now 6 is a perfect number so i need [ 6= 1+2+3 ] to print out on the screen. Any …

Software Development c c# c++
Member Avatar for clutchkiller
0
102
Member Avatar for GradStudent

How does Priority Queue work. This is my scenario, I have certain objects with priorities 1,2,..10. There could be multiple objects with same priority. I was thinking I can put them into a priority queue and let the pool() give me the objects with highest priority.. ? I m kinda …

Software Development java queue
Member Avatar for GradStudent
0
162
Member Avatar for jBat

Hi, I'm trying to convert a void pointer to a struct pointer.. that's seems very easy but my compiler give me error. Thanks. /home/subi/Personal/Projects/LinkedListUserInfo/main.cpp||In function ‘error_t parse_opt(int, char*, argp_state*)’:| /home/subi/Personal/Projects/LinkedListUserInfo/main.cpp|50|error: expected primary-expression before ‘)’ token| /home/subi/Personal/Projects/LinkedListUserInfo/main.cpp|50|error: expected ‘;’ before ‘null_pointer’| /home/subi/Personal/Projects/LinkedListUserInfo/main.cpp|48|warning: unused variable ‘null_pointer’| ||=== Build finished: 2 errors, 1 …

Software Development c++
Member Avatar for jBat
0
135
Member Avatar for jabbadabba

Here is my code atm [CODE]room_num = raw_input("Enter your room number: ") text_file = open("c:/roombookings.txt", "r") whole_thing = text_file.readline() if room_num in whole_thing: print "Room number found here is the information:" else : print "Room number not found." single_line = whole_thing.split('\n') for single_line in text_file.readlines(): if room_num in single_line: print …

Software Development python
Member Avatar for rueth
0
835
Member Avatar for ashkash

I have a 2d array with x and y coordinates. I need to figure out the north most, south most, east most, and west most points and print them out. I figure the best way to do this is to find the minimum x value and the corresponding point will …

Software Development java
0
69
Member Avatar for BrianK123

I have a series of of JOptionPanes pop up to get info from the user. However, if the user presses cancel, the machine gets an error (which is prevented). I'm trying to catch this and force the user to make a choice and press OK. MY code doesn't seem do …

Software Development java
Member Avatar for stultuske
0
2K
Member Avatar for DifficultUsrnme

[code] import java.io.*; import java.lang.*; import java.util.*; class CustomerInfo { public String name = new String(); public String accnNumber =new Sting(); public String accnType = new String(); public float balance = 0.0F; public float rateOfInterest =0.0F; public float interest = 0.0F; public float useBalance = 0.0F; public String password = …

Software Development java
Member Avatar for BestJewSinceJC
0
130
Member Avatar for nats01282

I am after making my program wait before responding to the users input, what code do i use for this and how do i implement it? [CODE]#include <iostream> using namespace std; int main() { char instuctions = 0; int A = 0; // user input 1 int B = 0; …

Software Development c++
Member Avatar for Stefano Mtangoo
0
168
Member Avatar for fmma

Problem: Use a 2 dimensional static array with 3 rows & 2 columns to the course number and number grade you have received in that course. The program should have three functions called get information, printinformation, and convert. You need to send array to getinformation and printinformation functions as parameters. …

Software Development c++
Member Avatar for Lerner
0
152
Member Avatar for denero1

Please enter a integer for knick-knacking (pyhton question)? if the number is 1, with his thumb if the number is 2, with his shoe if the number is 3, with his knee if the number is 4, at his door this is what i have -_- [code] def main(): again …

Software Development python
Member Avatar for Tech B
0
75
Member Avatar for Kikazaru

Is there any advantage in declaring a variable local to a function const? i.e., I want to use a sine value a couple of times so I store it in a local variable. If I make it const does this facilitate any compiler optimizations... or anything beneficial? [CODE] double my_func(double …

Software Development c++
Member Avatar for vijayan121
0
3K
Member Avatar for camigirl4k3

Now...when done. the output should look like this: >>> main() Welcome to the game of BULLS and COWS. The objective in this game is for you to guess a 4-digit number The computer responds with how close your guess is to the target BULLS = # common digits with exact …

Software Development python
Member Avatar for Tech B
0
364
Member Avatar for PhiberOptik

Hey guys I'm using Tiled (mapeditor.org) for the mapping in my game and I have made a few maps, and started implementing them in my game. The first thing I had to do was decode them from base64, then gunzip the string. Now I am on the last step and …

Software Development java
Member Avatar for PhiberOptik
0
156
Member Avatar for ceyesuma

Why does this give the error "cannot reference this before supertype constructor has been called" I thought that is the first thing I did in the constructor. [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package application1; import …

Software Development java java-swing
Member Avatar for ceyesuma
0
193
Member Avatar for snakay

Hi, I'm trying to use a public webservice, which I have been using for years with other programming environment where you have to prepare everything at a lower level of coding, placing everything with hand( soap header, body, authantication etc). In VS2008 I have succeded referencing and accessing the web …

Software Development
Member Avatar for snakay
0
155
Member Avatar for Nicholas_Roge

As the title states, I'm trying to learn how to create a custom GUI window for Windows. Basically I'm asking how I can output pixels to the screen without using any of the default windows gui classes.

Software Development c++ gui
Member Avatar for Stefano Mtangoo
0
113
Member Avatar for mahdi68

Hi How can i know in java , pc is connected to internet or no (is online or offline) ??? thanks

Software Development java
Member Avatar for mahdi68
0
99
Member Avatar for Clawsy

Hi, I have little experience with writing to Http socket. I am trying to send data to another computer through Http protocol, just like having a chat between two application but instead of using Socket connection I want to use Http connection. The server writes to [I]http[/I] connection data and …

Software Development client-server http-protocol java
Member Avatar for Clawsy
0
229
Member Avatar for tkud

Hey everyone, I want to start learning socket programming. Ay references and advices will be greatly appreciated!!

Software Development c++ socket-programming
Member Avatar for Stefano Mtangoo
0
150
Member Avatar for SimonLarsen

I'm working on my first game in C++ and SDL. The game compiles and runs perfectly on both my boxes (Arch Linux and Windows XP). When two of my friends were to test the game, one of them (running Windows Vista) said his machine BSoD'd every time he ran the …

Software Development c c# c++ microsoft-access windows-vista
Member Avatar for SimonLarsen
0
237
Member Avatar for aaanchal

i m working with this program but dont know how to add counter in it in order to check running / execution time of program.please help me. and telll how and where to add code for this task?plz reply soon. public class InsertionSort{ public static void main(String a[]){ int i; …

Software Development java
Member Avatar for darkagn
0
183
Member Avatar for chixm8_49

Hello. I am constructing a database using GUI. I wanted to have all my containers to be on one window. I am having a problem on how to have these containers on one window. Any suggestions? I am very sorry if the code was seem weird. Here's the code: [CODE]public …

Software Development gui java
Member Avatar for darkagn
0
98
Member Avatar for Sawamura

hi masters.. anyone know what it shell? and how to do it? any code more helps... thx.. Best Regards

Software Development vb.net
Member Avatar for kvprajapati
0
488
Member Avatar for jmguerriero

This is my first post in the Dani community. I am brand new to java, 5 weeks into an intro to computer programming course. My assignment is to create 10 random numbers between 50 and 100. Then I am supposed to sort them from lowest to highest, find the average …

Software Development java
Member Avatar for jmguerriero
0
554
Member Avatar for avinash_545

hi everyone!!!! I am currently working on a small vb.net project which consists of several windows. These windows consist of buttons and so on and if I click on one of these buttons, another window opens up and the previous window just closes up or hides itself. The problem is …

Software Development vb.net
Member Avatar for avinash_545
0
103
Member Avatar for lloydi12345

hello,i think this is just a simple question but im not really familiar with the basics of VB6.0 so i am asking it, can i ask how can i set integer value on text1.text without making the value visible on the textbox when i run the program? thanks like text1.text …

Software Development visual-basic
Member Avatar for student02
0
254
Member Avatar for spesseh

Hi all. This is probably quite a newbish question, but i have a input for a number. From the entered number, i want to extract the first digit in the number. So if the typed in number is 43, i want to extract the 4, but not the 3. In …

Software Development python
Member Avatar for spesseh
0
9K
Member Avatar for aaanchal

im working with this program for merge sort. i want to add a counter in it in order to check running / execution time ofd program. please help me. please reply soon. public class mergeSort{ public static void main(String a[]){ int i; int array[] = {12,9,4,99,120,1,3,10}; System.out.println(" Selection Sort\n\n"); System.out.println("Values …

Software Development java
Member Avatar for -ordi-
0
303
Member Avatar for Enigmatic331

Dear all, I am currently working on a mini-application using Visual C++, and it goes pretty much like this: The program, using mousehook, will retrieve the coordinates of the current mouse position using getcursorpos when a right click is executed, and it will return with a red dot on the …

Software Development c++
Member Avatar for Enigmatic331
0
171
Member Avatar for nirav99

How can i call (execute) a file (with ".c" extention) from the particular path without including it into main file ? Now the file which we have to call from particular path is containing only a function (without "main()").....

Software Development c file-system
Member Avatar for WaltP
0
72
Member Avatar for DrewDodson89

My program is able to create the folder fine but I wanted to know if there is a way to put the date and time in the title? C++ and using Visual Studio 2008 for Windows. [CODE]system("mkdir %SYSTEMDRIVE%\\Blebble\\Blabble");[/CODE]

Software Development c c# c++ visual-studio
Member Avatar for DrewDodson89
0
228
Member Avatar for wilko1995

Hey, WHen i load Dev-C++ a box comes up and says "There doesn't seem to be a GNU Make File in Path or in Dev-C++'s bin... " how do i make a GNU Make File? wilko1995

Software Development c++
Member Avatar for abhi_elementx
0
119
Member Avatar for Stefano Mtangoo

What are rules to observer when writting More than one class in single Java file. Let say three classes on the same file Thansk

Software Development java
Member Avatar for kvprajapati
0
139
Member Avatar for wolfkrug

Can anyone tell me how to execute a program like this, it is written, it compiles, my input and output word documents are both up and running and saved. What do I need to do to get my output document to show results from my program? Thanks.

Software Development c++
Member Avatar for jonsca
0
149
Member Avatar for nhalavanja

Hello all, I have been assigned in my class to come up with a program that is written in c and generates prime numbers from 2 to n. I have coded the problem but i have a problem. Any numbers greater than 6479 will not return the results that I …

Software Development c
Member Avatar for Salem
0
112
Member Avatar for robertl

Hi Guys, For my application i'm trying to generate a datagridview with a comboboxcolumn in it. This combobox I wanna fill with some data from a table in my database. I've figured out how to add items to the combobox but I can't assign a value to it. The combobox …

Software Development dataset vb.net
Member Avatar for robertl
0
163
Member Avatar for johndoe444

In the following program though most of the working part of the program is commented out, it gives seg fault. reducing the value of MAX to say 10000 removes the seg fault. Why is this happening? it should be only 1 MB only. Is 1 MB too big for an …

Software Development c
Member Avatar for Salem
0
172
Member Avatar for merrycit

How can I obtain a value from inside a for loop? I declared the variable in the method and not inside the loop. When I use the same variable in an if statement in the same method however, I get a message saying that the variable has not been initialized. …

Software Development java
Member Avatar for kvass
0
151
Member Avatar for JTX

Let's say there's list of numbers like this saved in a txt file: 4 6 3 4 5 How do I put it into an array?

Software Development c++
Member Avatar for JTX
0
142
Member Avatar for spikeru

I am a beginner with C++ so please excuse my ignorance. I am attempting to pass a dynamically created 2d array to a function. The array the [3]x[variable] array is created like this. [CODE] //Create array for the transformed coords double **transf; transf = new double*[3]; for (int i=0;i<atoms;i++){ cout …

Software Development c++
Member Avatar for vmanes
0
1K
Member Avatar for smith!

hi there i really need help to write a java program on this i dont understand anything in java plzz i need help. ive put and attachment on so people could have a look at it. thanks [ATTACH]13921[/ATTACH]

Software Development java
Member Avatar for kvprajapati
0
111

The End.