132,729 Archived Topics
Remove Filter ![]() | |
I'm developing a program based on the Tower of Hanoi. It accepts the number of discs and returns the amount of turns it takes for those discs to complete the conundrum. All of my inputs work fine, until the input (d) is greater than 31. Is the result too large … Software Development java | |
heres my question: which tend to change more frequently: interfaces or implementations? How does proper OO design take advantage of this observation? I think the answer is implementations Software Development | |
have been working on a program that should output the values of an array from lowest to highest order, my program runs but its ouputing -1.#IND which is clearly not right. Im pretty sure im messing up somewhere when i call back to my my function with selectionSort(array, N) but … Software Development c++ | |
Hi, I am writing a code that reads input from user to create a linked list database at the same, time it write the data received in to binary file. when I run the program is supposed to prompt the user to enter the data for ten time, however the … Software Development c c# c++ ios linked-list | |
Hello. I've created a program which calculates points which belong to a specific graph, such as Archimedes spiral, Logarithmic spiral, Cardioid etc. The program generates an array with coordinates. Technically coordinates are polar, but I can convert them to cartesian by using polar() function. Question is - how do i … | |
Hi, Is there anyone who know which complexity these functions are? I mean O(n), O(n^2), O(n^3), n log(n) or log(n) 1. --------------------------------------------- [CODE]void bogosort_array(double a[], int length) { do shuffle_array(a, length); while (! is_array_sorted(a, length)); }[/CODE] 2. --------------------------------------------- [CODE]void reverse_string(char* s) { int n = strlen(s); for (int i = … Software Development c | |
Hi guys. I am hoping for a little help with this. I am pretty new to programming and just can't seem to get things right yet. Here is my code. It returns like 40 errors. Way messed up eh? [CODE]#include <iostream> #include <string> using namespace std; class Date { public: … | |
Whats wrong with this code. I can create the DAT file.Name and Grade is writing to the file perfectly. but the file contains ASCII values for RollNO and after Grade. [B]Output file:[/B] Name A ÈB [B]Program[/B]: #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> class stu { int rollno; char name[20]; char grade; float … Software Development c c# c++ file-system ios | |
Hi! I would like to add a timer to JTextField. However, my timer does not run. Could you, please, tell me what is wrong in my code. Thanks! [CODE] timerTask = new MyTimerTask(); timer.schedule(timerTask, new Date(0), 5000); // 5 seconds delay ... private class MyTimerTask extends TimerTask { @Override public … Software Development java | |
I'm attempting to make a Tic-Tac-Toe against the computer program, I'm pretty much done, but i can't figure out how to stop the computer from making the exact same move as the human does. Thank You. [CODE]// Include the libraries #include <iostream> #include <string> // Use standerd namespaces. using namespace … | |
I have a problem that needs fixing How do you get all open tabs shown in a KryptonListbox My fail attempt : TabpagesHtml.Items.Add(Form1.SuperKryptonNavigator.Pages.Item(0)) : :@ | |
I'm supposed to implement a queue using a singly linked circular linked list (it also has to be generic). It keeps saying there are incompatible types at lines 44 and 45. I've honestly been trying to work this out for hours, but I don't understand what i'm doing wrong. Any … Software Development java linked-list queue | |
[COLOR="Red"]I have an assignment from my data structures course.We learn almost nothing about C++.But they gave that assignment,and said do it anyway.Many of my classmates have it done with money.But I wanna learn how to make this project by myself.I'm thinking about the structure for 5 days and nights.I wanna … Software Development algorithm c++ data-structure open-source | |
Hi everyone im a bit confused with my work and i hope you can help me. i need to get some values from a text file and enter it into a 2D array ive done this part ok with the following code however in my file i have some other … Software Development java | |
I am having problems working on this project about making a baffle game. I have most of the code written already I just can't figure out how to do the shot laser part and determining where the laser exits the box. The point of the game is that there are … Software Development c++ | |
I'm trying to search a specified range of numbers and I'm currently using regular expressions. The lines I'm searching contain numbers from 00 to 30, but I only want to find the lines containing 02 to 22. I have tried a few different things, but none of them work. this … Software Development python | |
Hey guys. I'm new to SDL and C++ and I've stumbled upon a problem here. Here's the code: [CODE]#include <SDL/SDL.h> #include <SDL/SDL_ttf.h> #include <SDL/SDL_image.h> #include <string> using namespace std; const int screenheight = 1920; const int screenwidth = 1080; const int screenbpp = 32; int right,down = 0; SDL_Surface *bakgrund … Software Development c++ | |
[code] #include <iostream> #include <cstring> #include <fstream> using namespace std; const int length = 25; void insertionSort(int numb, char* anArray[]) { char temp[length]; int pos; for(int i = 1; i < numb; i++) { strncpy(temp, anArray[i], length); pos = i; //moves "higher" letters to the right while(pos > 0 && … Software Development c++ | |
Say i want a friend function to have access to two classes which are derived from the same base..I declare the friend function prototye in both classes, but where do i code the actual definition?? is the code below right?? (mixBreed() is the friend function).. [code=c] // Dog.h #include "Animal.h" … Software Development c++ | |
I am writing a program that will take a sentence and find out how many of one character (like how many h's) is in the sentence. I have started what I think works and got the program to work once but after the one time I cant get it to … Software Development c | |
I am generating random numbers and want to write them into a file. But its writing them in binary and I am not able to open them using a text editor. How do I write them in Ascii? Also what is the fastest method to write them into a file? … Software Development java | |
Hi, Please help... I am trying to read in a file in C++ and when I use getline I am not able to read in the last line when the last line in the input file does not have a newline (\n) at the end. How do I do this? … Software Development c++ file-system | |
hey guys/...am stuck at one point....help me please! ! ! its a quiz progg... one ques...4 options... i have one button---NEXT QUES--- It should display the next ques--it should also take the user selected option, compare it with the correct option and show if the Answer is right or wrong … Software Development java | |
i know how to get a file and all but how do u go about putting that file into the tree? my get file [CODE]void BST::loadFile() { cout << "Enter the the file location" << endl; cin >> inFileName; inFile.open(inFileName.c_str()); if (!inFile.is_open()) //test for file { cerr << "Cannot open … Software Development c++ file-system | |
Hello, I have created a simple frame, and in it there are 3 panels.I have a button in the bottom panel, and when pressed should display the text "You pressed the button", in the mainPanel.However this is not working.Can anyone shed some light as to what I am doing wrong … Software Development gui java java-swing | |
Hello! (I would like to use tkinter. ) I'm going to do my program who convert roman letters to arabic numbers and vise versa. I'm going to do two buttons and a textfield where you can write in the number or letters and then choose if you want it transelate … | |
Hi, I'm a BSD Socket beginner and I would like to make a small networking program written in C. I've read many instructional articles and I haven't found a example how to send/receive a non-char - string sending everywhere. I mean, I thought about sending some various structures as "frames". … | |
Hello, Im creating a application in Microsoft access. I need to protect it with a license manager. I have built one but works from the computer. Whats i realy need is that i puplish my license database on the internet and in the application when you press active software it … Software Development microsoft-access visual-basic | |
Basically I've finished my code for the most part and I'm having trouble figuring out how to initialize loan, mort_gage, and downpayment. Is it possible to use a pointer for each of these and call the address back to main? I'm so confused...it's just one of those little things that's … Software Development c | |
[code=C++] #include <cstdlib> #include <iostream> using namespace std; class fractions { private: int numerator1, denominator1, numerator2, denominator2; public: fractions(int = 0, int = 1, int = 0, int = 1); void read_fractions (); void multiply_fractions (); void add_fractions (); double add_fractions (double); double multiply_fractions (double); }; void fractions::read_fractions () { … Software Development c++ | |
Hi, im trying to figure out how to call a function's variable from here [CODE]def legal_moves(board): moves = [] for square in range(DINNER): if board [square] == SPACE: moves.append(square) return moves[/CODE] I want to take the variable moves and use it for main How would I do that? Software Development python | |
hi there im using visual c# i have a list box and it contains about 50 textboxes arranged in a tabular fashion. the textboxes are represented by an array myTextBox[50]. what i wanted to do is to focus a particular textbox in the listbox. so what i did is [CODE]myTextBox[3].Focus()[/CODE] … Software Development | |
guys my vector isn't working properly with push back function ... so i am searching for the alternative method ... please help me with your advices... Software Development c++ | |
[CODE]ENSTRUG00000000009 ENSTRUT00000000011 1026 509 5896 ENSTRUG00000000011 ENSTRUT00000000014 420 63 482 ENSTRUG00000000012 ENSTRUT00000000015 10902 15313 93157 ENSTRUG00000000012 ENSTRUT00000000016 2844 23243 60985 [/CODE] as this is my input file it has five coloumns and there is for each line , we have to identify unique entry from the first coloumns which high … Software Development python | |
I am in the early stages of working with programing. Everyone I talk to around here who is in programing knows how to do the hard stuff but everyone of them said they did not have to start off using basic. I am trying to make that numbers game. I … Software Development visual-basic | |
Hey guys, im just learning how to use methods but I really cant seem to understand them. We have a question where we have to write a program for the following game. There is a little known dice game which is played with a pair of dice and has the … Software Development java | |
Hello everyone. My name is Mike. I am a new member :). I hope to be using this forum quite a bit to extend my knowledge base on c++ and java.(just wanted to introduce myself being my 1st post and all lol) Well my class was tasked with making a … | |
Hi guys, Im pretty new to programming so bear with me if you think this is baby stuff:P Ive just been introduced to methods last weeks and after a week of study Im no better at understanding them. The problem is I just seem to grasp how to you them … Software Development java | |
Hi all, I am trying to update the colour of a Tkinter label, so as the value of a variable changes so to does the colour of the text. Below is a simple example of what I am trying to achieve, but the problem is when I press the button … | |
Hi there friendly people of daniweb. My problem is that when i double click an executable jar file, nothing happens. Even when i use command prompt and type java -jar "filenae" it doesnt work. Any ideas why? Software Development java | |
Hi, I am having some trouble writing this code. The question is as follows: The Sieve of Erastophenes is an algorithm -- known to ancient greeks -- that finds all prime numbers up to a given number n. It does this by first creating a list L from 2 to … | |
hello, i want to be able to split this string: "StraightPath1, 1, 2" into 3 sections: name, x, y. but when i use this code:[CODE]string[] pieces = line.Split(',')[/CODE] it only i can only read the last 2 parts like this: [CODE] string Name = pieces[0]; //output: null int X = … Software Development | |
I have created my program there in vb.net(visual studio 2008). I have used crystal report to show reports. However after creating setup file by advance installer I have tried to install it there in my client`s pc. Everything is working but crystal reports are not working. When I am trying … Software Development assembly vb.net visual-studio xml | |
i have written the code in client,server,interfaces.i have created stubs and skaleton. i have run rmiregistry very well.i have run server.i have an error in client side,when i run client.it is moving to the catch not looking up to the correct address of server. the code of client is: [CODE]import … Software Development client-server java | |
[code=Java]import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; public class DeleteProductServlet extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { DBManager db=new DBManager(); Connection … Software Development java | |
hello guys... I have a file [B]MyClass.cpp[/B] inwhich I declared a vector array. I then added some string data to it and want to access it in [B]MyProjDlg.cpp[/B]. It is dialoged based app in vc6. Here it is [code] MyClass.cpp ----------- using namespace std; typedef vector<LPTSTR> StudentData; //some code here... … Software Development c++ | |
Hi, My program is trying to read from file Lithuanian words, the language has some additional characters than ANSII character set. The program uses wstring, wifstring classes for reading, but I gotta feeling it is something wrong with input,do I need any special directive to compiler or the language has … Software Development c++ | |
hey guys... i made a database using Access....it consists of questions and 4options each... i made a quiz progg through java and connected the database using jdbc.... before,since it was my trial attempt, i entered silly ques into the database like whats ur name with 4 options....just to check if … Software Development java | |
Hi ,I work with vb.net 2005 . I want to know if I want to connect to data base with Ms Access which data source i can use (ODBC or OLEDB) I write the following code in form load event (by OLEDB) : [COLOR=#0000ff]Dim[/COLOR] conn [COLOR=#0000ff]As[/COLOR] [COLOR=#0000ff]New[/COLOR] OleDb.OleDbConnection([COLOR=#800000]"Jet OLEDB:Global Partial … Software Development dataset microsoft-access microsoft-office vb.net | |
How can i set fixed size of Jpanel where during execution of the program i shouldn't be able to RESIZE that Jpanel? plzzz help !!!!!!!!! Software Development java |
The End.