132,726 Archived Topics
Remove Filter ![]() | |
I can't seem to get my counting loop to stop if m OR n are <=500. The loop stops only when m hits 499 right now, but I need it to cancel if n is 499. I have tried using a break statement, but I'm not sure what else to … Software Development java | |
Hi, I want to convert a string to numbers ... i tried a lot of codes.. iam a beginner... Kindly help... Ex: a=1 b=2 c=3 d=4 e=5 f=6 g=7 h=8 i=9 j=10 input value -->abc output value --> 123 input value -->abcj output value -->12310 I mean i want to … | |
Hello, I got a new problem. Our teacher asked us to create a menu-driven program which will make all types of conversions ([url]http://classroom.sdmesa.edu/vtrinh/pp4.html[/url]). This program must be able to do conversions back and forth (like inches to centimeters, and centimeters to inches). Below I started the assignment and so far … Software Development c++ | |
In my tree class the user can set the fall color of whatever tree they choose, but it's not taking the colors I type in when I test it. [CODE]import java.awt.Color; public class Tree { private String treeSpecies; private int treePrice; private Color currentColor; private Color fallColor; private int treeAge; … Software Development java ![]() | |
Help me with this project?: You will create a login system that allows a user to access his/her account. A successful login is defined when both the login and password match. Once a successful login occurs, the program should welcome the user by using their Employee ID. Eg. Welcome Employee … Software Development c | |
I'm having some problems finding memory management errors in this code. The only one I see as a possible error is the deleting the dereferenced pointer, but I'm not even sure if thats correct. Some of the errors should include memory leaks, memory deletion when still in use, two objects … Software Development c++ | |
please help me how i would write these two programs. im learning c++ and am having difficulties, if anyone can help i will greatly appreciate it. Write a C++ program that displays the results of the expressions 3.0 *5.0, 7.1 * 8.3 – 2.2, and 3.2 / (6.1 * 5). … Software Development c++ | |
Say I have a class: [CODE]class foo { public: foo(); int len{return 1}; }; [/CODE] Then in main I have a class pointer: [CODE] foo *var[5]; [/CODE] My question is when do class pointers get initialized? Or do they not? How would one initialize them? Software Development c++ | |
Hey guys, I think I have a pretty simple fix here, I just need somebody to point out my error. I'm getting a seg fault after writing to an array of char. I need my function to run through the array and find pairs. If every char in the array … Software Development c++ | |
Hi! Having some major issues my homework assignment. I have to end this while loop when detecting two consecutive newline escape sequences in a row. This is the word problem: Write a program that gives and takes advice on program writing. The program starts by writing a piece of advice … | |
hi there, im using mfc when i close my dialog box i want to disable mouse move events, so any idea how to do that? i want to do that because i have problems, mouse move event happen before closing dialog box and i dont want that. have no idea … Software Development c++ | |
Hi i'm Browsing a file, then showing the contents of file in tree control, i just want that if user wants to browse again a file, then in tree control previous items should be removed and new file items shouls present only can any1 help me, how to do that … Software Development c++ | |
Hi all, I'm learning socket programming in Unix. My jobs is sending some frames over TCP/IP Client-Server model, ex Hello, Ack, Bye packets. Each frames have a ID field, which helps we know which packet the server/client received. For example, 1 for Hello, 2 for Ack and 3 for Bye. … Software Development c client-server socket-programming unix | |
Hi, I spent a lot of hours, why this code is wrong. This code compiles good, but execution causes errors (during sorting objects). Environment: (MinGW WinXP or VS 2008) [code] #include <iostream> #include <vector> #include <algorithm> using namespace std; class Edge1 { int v_,w_,weight_; public: Edge1(int v, int w, double … | |
what my code does is it waits for the user to type in "led" and performs the blink function. what i am trying to do is introduce the letter 'p' as a command to stop the blinking. what happens is that blink is only executed once. [CODE]if (!(strcmp(userinput, led))){ //condition … Software Development c | |
Using this code:[CODE] class box { public: int x; int y; XMMATRIX world; ConstantBuffer cb; cb.mWorld = XMMatrixTranspose( world ); box(int a, int b){x=a;y=b;} };[/CODE] Gives error on "cb"(This declaration has no storage type or class or type specifier. What should i do about this? Is it not possible to … | |
hello guys...if it is simple question plz excuse me... [B]1)[/B] I have a var associated with ListBox (you know adding var to the control in MFC). Now I can access it in one class [B]"MyProgDlg.cpp"[/B] but can't access it in another class [B]"classA.cpp"[/B], why is this so [B]2)[/B] how do … Software Development c++ | |
We have an assignment to write a program finding the nth Fibonacci number. On the web, there are some standard mathematical equations for this, but that would just defeat the purpose of this assignment if I use those formulas. I have my current code down here(with some sketchy back up … Software Development java ![]() | |
The recently made a change to my code that made it work correctly. I would like someone to help me understand why it works, but it did not work before. [B]Before (not working correctly)[/B] total = (amountPaid - purchaseAmount) * 100; totalInt = total //changes from float to int totalDollars … Software Development c++ | |
Is it possible to use a string with classes? Even if you are using a class specification file and implementation file? I need to have 3 member variables that need to store a string. Or is an array of characters a better fit when it comes to classes? Software Development c++ | |
[CODE]a.cpp: In function ‘int main()’: a.cpp:39: error: no matching function for call to ‘find(int&, int)’ [/CODE] [CODE]#include <iostream> #include <fstream> using namespace std; int minutes, seconds; char temp; int array_l; bool* sees; int* a; int saade; int main() { ifstream sisf("raadio.sis"); ofstream valf("raadio.val"); /* * How many songs? */ sisf … Software Development c++ | |
[CODE] import javax.swing.*; // Needed for swing classes import java.awt.event.*; // Needed for the action listener import java.io.*; // Needed for the file and IOException import java.util.Scanner; // Needed for the scanner class import java.util.List; // Needed for the arraylist import java.util.Arrays; // Needed for the arraylict class /** This … Software Development java java-swing | |
Hi all, i'm new to Templates and when i tried to implement templates methods which needs to use a map (which is a member in private), the map can only do 3 things: insert, swap, and operator =. and i don't get the full functionality of map.. Here's the code: … Software Development c++ | |
Hi I'm currently writing an Othello game using the Windows API. I have 3 classes in my program, the first class is simply called "Othello" and it handles almost everything. I also have a class called Field that's used to control which fields are black which are white etc. My … Software Development api c++ windows-api | |
particularly from a txt file. for example if the file reads "name ###-####-#### address" all in one single line. how do i put all three items in three separate variables and print them? Software Development java | |
So I'm trying to build this program for class and the teacher didn't really show us how to do it and is leaving it up to us to figure it out. The directions are as follows: The program will input the divers name, the scores of the 5 judges, and … Software Development java | |
i have a problem,,here in turbo c i don't know if what kind of loop i will use can you please help me with this problem?? "write a program that accepts ordinary number and outputs,the equivalent in roman numerals" 1------I 5------V 10-----X 50-----L 100----C 500----D 1000---M 1500---MD Until 3000 Only Software Development c | |
Can anyone give me some ideas on how to find the middle value between 3 numbers.? I really dont know how to start... I know how find minimum and maximum but finding the Middle value is kinda hard for me... For those C Wizards give me some idea advice please?., … Software Development c | |
Procedure which checks the number of eating properly entered in edit box with a comma Software Development pascal | |
Is the following code snippet show valid inheritance? [code]class A { int v; final String sayHello() { return "Hello"; } } class B extends A { public int sayHello(int a) { return 3 + a; } }[/code] Software Development java | |
Hi All, I am developing an windows application in .Net 2005 with C# coding. One part of my work, the functionality is 1. Use USB barcode scanner. 2. When something is scanned, it records the item number and automatically pulls the item price from the database. 3. After an item … Software Development dataset open-source | |
Why copy remains empty after every assgment in for() ? [code] int main() { const char* c = "abcde"; int size = strlen(c); char* copy = new char[size]; for(const char* p = (c + size - 1); p >= c; p--) { *copy++ = *p; } copy[size] = 0; for(int … Software Development c++ | |
Maybe this is more of a "how do you report progress" topic. I have a progress bar on a form. The same form launches 2 separate threads. I would like each thread to report to the same progress bar. Instead of cluttering my code up with a bunch of stuff … Software Development | |
Ok I have the Hwnd to a particular window I want to work with. Lets call this windows program the "UNWANTED". This UNWANTED window has two things I wish to identify it by. The first one I already have.. which is it's windows handle! Second.. is what I need to … Software Development c++ | |
My file needs to be updated frequently, meaning that new data has to be appended, but in a very specific way. The following is the sample content of my "file.txt" (2 vectors of length 6): [code] 1 2 3 4 5 6 7 8 3 4 5 6 [/code] After … | |
Hi all. I am coding a program and I want it to save what the user types in for next load up. So for example... User types 'hello' in texbox1 User closes program. User opens program few days later. User sees in textbox1 it says 'hello' Any ideas how to … Software Development vb.net | |
Hi! I would like to add ActionListener to buttons stored in JToolBar. However, if I'm using the code bellow, then I could add only MouseListener ("addActionListener" doesn't work). So, is it possible to somehow add ActionListener? Thanks a lot! [CODE] JToolBar toolBarUpdateDocs = new BrowserToolBar(); toolBarUpdateDocs.setFloatable(false); toolBarUpdateDocs.getComponent(i).addActionListener(new java.awt.event.ActionListener() { public … Software Development java | |
Hi guys ive got a problem in my Tab control. you see, i have 2 tabs in my form then inside it i i got a [B]ListView[/B]. What i want to do is when a user clicks on the [B]First Tab[/B] some buttons in my form will be disabled but … | |
Hello there! Well you see, I have got this little problem and I usually dont post on forums unless I am really stuck at something :s So I am trying to accomplish something that more or less comes down to this: I have several forms with several textboxes and by … Software Development | |
Program descr: Im trying to make a windows manager for windows I might draw in CONSOLE. the plan is to draw manually windows in the console in an objectified way. instead of drawing the windows using console coordinates I create a buffer then use [URL="http://msdn.microsoft.com/en-us/library/ms687404(VS.85).aspx"]writeConsoleOutput[/URL] to write this buffer to … Software Development c++ window-manager | |
I'm attempting to write a game server and I need it to continue on with the code while listening for a connection. I know this is done with the threading module but I don't know how exactly to do this. Python documentation didn't work for me. [CODE] #[LISTENER] print "Initializing … Software Development python | |
I looked all over Google, but could not find anything other than: [CODE]File.WriteAllLines();[/CODE] It does not work, it just appends it. Cheers. Software Development | |
Is it possible to use a timer to be able to count up, stop, and count down and be able to change the speed on the fly? Trying to make a simulator program that behaves like the real unit. The count also needs to stay in the 0000 format. ie; … Software Development vb.net | |
hi there! i'm have a biiig trouble. I've make a simple chatbot, as can learning. The problem is, that I can't insert data into the dictionary without a error. here is the code: [CODE] codes = {} def arraycompare(array1, array2): l = 0 for i in array1: for j in … Software Development python | |
[CODE]class hello { } class hello1 { public static void main(String aa[]) { hello ob[]={new hello(),new hello(),new hello()}; hello ob1[]=ob.clone(); // 1 } }[/CODE] ob is an array which is also treated as an object, and hence has a default clone method which is called at (1). But the default … Software Development java | |
Hello, I am learning C by reading the second edition of "The C Programming Language" by K&R but am struggling to understand this bit of code on page 145: [code=c] struct nlist *np; if ((np = lookup(name)) == NULL){ np = (struct nlist *) malloc(sizeof(*np)); ..... } [/code] Lookup returns … Software Development c | |
I am using VB & Access to create a program for a clinic. I want to create a Report. The Report is - Toal quantity of each medicine received & Issued. I have created the Table in design time & in runtime contents in the table are deleted and new … Software Development microsoft-access visual-basic | |
Hello everyone! I have this code [CODE] string constring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DataBasePath + ";Persist Security Info=False;Jet OLEDB:Database Password=""; conn = new OleDbConnection(constring); conn.Open() string searchstring = "SELECT * FROM MyTable WHERE field2=@field2"; OleDbCommand cmdsearch = new OleDbCommand(searchstring, conn); OleDbDataReader reader; cmdsearch.Parameters.AddWithValue("@field2", dgrDoc[1, index].Value.ToString()); reader = cmdsearch.ExecuteReader(); [/CODE] How … Software Development c# open-source | |
Greetings! I creating report in visual basic data report. I want to costumize the paper size that i want to use. I try to make a printing report in a small paper size like bank check size of paper. Anybody have idea how can i do this. is there any … Software Development visual-basic | |
The End.