132,726 Archived Topics
Remove Filter ![]() | |
i am currently work on mp3 player application, but every time the song ended, this error always pops out.. Value of '282' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'. Parameter name: Value here's my code: [CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using … Software Development | |
Ok so I've got this homework problem thats killing me. Here's the problem: A bank account charges $10 per month plus the following check fees for a commercial checking account: $.10 each for fewer than 20 checks $.08 each for 20-39 checks $.06 each for 40-59 checks $.04 each for … Software Development c++ | |
in my code i have declared [CODE]typedef signed long long int slong; const slong limit=4000000; const slong limitsqr=2000;[/CODE] i then created an array [CODE]slong* array=new slong[limit];[/CODE] without any problem. when i try this [CODE]slong* newarray=new slong[limitsqr][limitsqr];[/CODE] i get the error message: in function int main() cannot convert slong(*)[2000] to slong … Software Development c++ | |
[CODE]#include<iostream> #include<iomanip> #include<string> class Pizza{ public: std::string type; std::string size; int toppings; Pizza(){} void setType(std::string type){ type = type; } std::string getType(){ return type; } void setSize(std::string size){ size = size; } std::string getSize(){ return size; } void outputDescription(){ //cout<<"A " cout<<getType(); cout<<" pizza; } }; int main(){ Pizza large … Software Development c++ visual-studio | |
Hello, I want to write a program in C++ that approaches the number pi by using the Monte Carlo algorithm. Therefore I need random numbers. When the amount of random numbers goes to infinity, the probability will approach the theoretical propability, which is a function of pi. I know all … | |
Hi everyone. i have an issue with a server program i'm developing for a university project. The issue is the following: The server program i'm building uses shared memory and forks. However i have a problem as to how can i destroy the shared memory segments i've created. A simplified … Software Development c client-server motherboards-cpu-ram multithreading | |
My func looks like: [CODE]int pop(node **hd, char **new_element) { node *dummy; int i = 0; if (empty(*hd) == 1) { printf("Stack is empty"); return -1; } else { (*new_element)[i] = (*hd)->element[i]; // problem is here ;) dummy = *hd; *hd = (*hd)->next; free(dummy); }[/CODE] and I call it via: … Software Development c | |
Hi there. I am trying to create a class rectangle. It should have data members length and width of type float (which should default to 1). The class should have member functions that calc. area() and perimeter() and also separate get() and set() functions for length and width. These should … Software Development c++ | |
I have to create a class called Polynomials and other called PolynomialTerm. The latter one to copy, add and multiply PolynomialTerm (exponents, coefficients). I also have to do the same for the Polynomial(which is an arrayList of PolynomialTerms). I am having problems adding the two polynomials.I need to do this … Software Development java | |
Hi guys, i created a panel with few buttons, all buttons have the same size, most buttons hold images, 2 of them hold string (1 or 2 digit) the string buttons will not align with the rest of them, and i have no idea why ? anyone ? [code] Public … Software Development vb.net | |
Hello, I have a project in BlueJ, called Game. Inside this project, I have the following files: File_A - A JApplet file which creates instances of Class_A and Class_B and calls their respective member functions. File_B - Implements Class_A (a JPanel) File_C - Implements Class_B( a JPanel) In order to … Software Development java | |
[code=c++]while(!infile2.eof()) { size_t found; string temp2, store, wordtobold; string command1 ("bold"); size_t prev_pos = 0, pos = 0; getline(infile2, temp2); store += temp2; found=store.find(command1); if (found!=string::npos) wordtobold = store.substr (found+4); while( (pos = wordtobold.find(' ', pos)) != string::npos ) { string wordtotag( wordtobold.substr(prev_pos, pos-prev_pos) ); cout << wordtotag; prev_pos = … Software Development c++ | |
This error is a big pain, simply because I cannot test solutions redily. On my build machine everything works fine, however having make a release and installed it on a different machine (in a differant building) things start to break because of the following exception: [B] System.Net.WebException : The underlying … Software Development client-server xml | |
Hi i was wondering if someone could tell if i am anywhere close to being on the right track. I have to create a program which adds, subtracts, multiplies, and divides fractions. I really am trying to get a grip on learning this stuff, so anyone who could give some … Software Development c++ | |
Hello everyone, this is my first time here on this website and forum, and after reading through some of it, I think it's very helpful, so I would like to say thank you. I am facing a problem that I have been trying to solve for a few days so … Software Development c programming-construct | |
Right now I need help adding numbers into an array. The function I have is not in the main function and the array parameters are passed by reference. Using something like [code]int add ( int grades[], int number_grades ) [/code] I need to have it so it will allow someone … Software Development c | |
I wonder if anyone can point out the source of my error. I am using the SDK for commercial software which _requires_ that I build etc in Visual Studio 2008. I confess that my C++ is rusty at best and that I don't understand a lot about using Visual Studio. … Software Development c++ visual-studio | |
Hello, I'm hoping someone can help me. The prior developer (over a year ago) created word templates to use as database reports (instead of Crystal). Within his VB.Net code, he calls a stored procedure which feeds the word template. Pretty basic so far. The template's fields are setup as Merge … Software Development vb.net | |
Hi all, I have this string "May 19, 2009 15:39:41.606809000" , i need to get the seconds into a double variable. My code is like this: [CODE]double sec; string seconds = str.substr(19,10); istringstream(seconds) >> sec; [/CODE] The thing is that seconds = 41.6068090 , but sec = 41.6068 Why doesn't … Software Development c++ | |
so I'm writing a binary search tree and a (so far very short) program taht uses it. Here's the code as it is (excluding any functions it doesn't actually use yet) main.cc: [CODE=c++]#include <ctime> #include <cstdlib> #include <iostream> #include "bintree.h" using namespace std; int main(){ double aipls[500]; bst<int> k; int … Software Development c++ | |
[CODE] if(Student[i].regNo.campus == "KUALA LUMPUR") Student[i].regNo.campus = 'W'; else if(Student[i].regNo.campus == "PERAK") Student[i].regNo.campus = 'a'; else if(Student[i].regNo.campus == "PENANG") Student[i].regNo.campus = 'b'; else if(Student[i].regNo.campus == "JOHOR") Student[i].regNo.campus = 'c'; else if(Student[i].regNo.campus == "PAHANG") Student[i].regNo.campus = 'd'; else if(Student[i].regNo.campus == "SABAH") Student[i].regNo.campus = 'e'; [/CODE] i got alot of warning message … Software Development c | |
Hi there, I have a question about header files/source files in Visual C++ (I use visual c++ 2005 express). I used to put all my code in one single .cpp file but now I have a test program (done by my tutor at Uni) which has 3 files: 2 .cpp … | |
Hi everybody, I bought the book "Deitel C++ How to Program, edition 5", and i am doing the exercises of the chapter 4, the exercise 4.28 ask you to write a program that print the following figure: [ICODE]* * * * * * * * * * * * * … Software Development c++ | |
So I've implemented the binary search tree but i get an error from the insertion function this is my code: [CODE]#include<iostream> #include<stdlib.h> #include<malloc.h> using namespace std; struct NOD{ int inf; struct NOD *left; struct NOD *right; }; NOD *root; bool Erase(int nr); void Insertion(int nr); int Search(NOD* node,int target); void … Software Development c++ | |
[code]Private Sub Command1_Click(Index As Integer) If KeyAscii = vbEnter Then If Len(Trim(txtlogin)) > 0 And Len(Trim(txtpwd)) > 0 Then If CheckPwd(txtlogin, txtpwd) = "ok" Then MsgBox "Password ok" Else MsgBox "Wrong password or Login not found." End If Else MsgBox "Login and password should not be blank" End If End … Software Development visual-basic | |
I am developing an application using Win32 GetOpenFileName win32 API. When the window opened even if I click cancel memory usage incredibly increases from 2 mb to 8 mb. What could be the reason of this behaviour? Thanks in advance. | |
Hello All, I am having some troubles with my code, which is: [code] import java.net.*; import java.io.*; class TestInet { public static void main(String args[]) { try{ InetAddress inet = InetAddress.getByName("72.14.203.106"); InetAddress inet1 = InetAddress.getLocalHost(); InetAddress inet2[] = InetAddress.getAllByName("www.google.com"); //InetAddress inet3 = InetAddress.getHostName(); System.out.println ("Host of IP is[inet.getByName]: " + … Software Development java | |
Here is my code. [CODE]import javax.swing.table.*; import javax.swing.*; import java.util.*; import java.awt.*; import java.awt.event.*; import java.awt.print.*; import java.awt.geom.*; import java.util.Calendar; public class Salary_report extends JFrame implements ActionListener { Vector data; JTable table; JLabel banner; ImageIcon images; Container c; Employee_report f1; JButton print; String s,days,basic,pf,hra,esi,bonus,advance,allowance,loan,incentive,dother,da,eother,gross,ded,net,leave; double ge,td,np,l,l1; public Salary_report(Employee_report f1) { … Software Development java java-swing pdf | |
hey frnz i need 2 make a c++ project ...but i dunno wat 2 make im so confused help me out..i need a guidline Software Development c++ | |
This code has errors [CODE]#include <iostream> void main() { int var [10]; for (I=0; I<5; I++) cout << var(i); }[/CODE] Now what I have come up with is this to correct the errors that I see. [CODE]#include <iostream> using namespace std; void main() { int var [10]; for (i=0; i<5; … Software Development c++ | |
Hi, Friends Here is a site which has video lecturses on C and C++ which are downloadable [URL="http://freevideolectures.com/computerscience"][B][COLOR=blue]http://freevideolectures.com/computerscience[/COLOR][/B][/URL] | |
I want to use the outtextxy() for the output of my program in the graphical mode,but the complier gives error when it encounters a variable in the outtextxy() as an argument. Suggest me how to slove this. for eg: [code] for(i=0;i<=3;i++) { outtextxy(100,200,i); setcolor(0); setfillstyle(SOLID_FILL,BLACK); bar(50, 50, 590, 430); } … | |
Hi Im new to XSL. Im trying to read a XML file that has identical node names with different values. [CODE] <mondial> <country car_code="MK" capital="cty-cid-cia-Macedonia-Skopje"> <name>Macedonia</name> <indep_date>1991-09-17</indep_date> <government>emerging democracy</government> <encompassed continent="europe" percentage="100"/> <ethnicgroups percentage="22">Albanian</ethnicgroups> <ethnicgroups percentage="2">Serb</ethnicgroups> <ethnicgroups percentage="65">Macedonian</ethnicgroups> <ethnicgroups percentage="4">Turkish</ethnicgroups> <ethnicgroups percentage="3">Gypsy</ethnicgroups> <religions percentage="30">Muslim</religions> <religions percentage="67">Christian Orthodox</religions> <languages percentage="21">Albanian</languages> <languages … Software Development xml | |
Hi friends, I got vb.net 2008 express and sql server 2005 and 2008 express editions whic I downloaded from microsoft website.Now I just want to connect vb.net with sql server 20o5 or 2008.I am using a connection string as PubConnstring = "Data Source=RAMAN\SQLEXPRESS;Database=FirmTest11;Trusted_Connection=Yes" [code] 'Create your connection object Dim objconnection … Software Development open-source vb.net | |
So what im trying to do is, if the user select his location then the listbox should be filled in with values. I always get [B]NameError: global name 'listcomputers' is not defined[/B] but i dont understand why. can anybody help me ? [CODE]import os import wx class MyForm(wx.Frame): def __init__(self): … | |
Hey guys! I'm trying to make this flowchart but I not quite sure how to do it. I'm supposed to make a flowchart that will ask the user a specific month and year, and the output would be how many days that that inputted month and year has. Kinda confused … Software Development java | |
I want to create a new thread in a program that i'm working on but i cant get my new threads to start does anyone have some code that would allow me to create and start new threads Software Development java | |
Hello World! Im doing a simple program that runs a JFrame and has some JButtons etc etc but id like to put a simple sound to one of my buttons, when i quit the program i want it to play a simple melody how can i put it in this … | |
im trying to output my bfs in this manner, showing the connections rather than the individual nodes: input 0 1 1 0 1 0 0 0 1 0 0 1 0 0 1 0 output (0,1) (0,2) (2,3) rather than: 0 1 2 3 this is my code so far, … | |
Hello Every One. I want to read weight from an electronic weight machine which is connected with computer and save it in a database. Please if any one know the procedure, please help me. Thanks Software Development visual-basic | |
Hi all, I have a double pointer in C as follows: [code] void foo(char * , char**); main( ) { char * inbuff = {0x10,0x20}; char * outbuff; foo(inbuff, (char **) &outbuff); } void foo(char *inbuff, char ** outbuff); { //code to manipulate inbuff and outbuff. *outbuff = (char *) … Software Development c++ | |
Hi everyone, I have a little problem with the class XmlDocument in .net. I'm using framework 2.0 and I am loading an xmlDocument from a path. The xml has a node without value like this: <somexmlnode/> When I load the xml using the xmlDocument class, it seems that it is … Software Development vb.net visual-basic xml | |
I am attempting to create code where the user can alter the A elements in the list continuously. If another letter in the list is replaced however, it should ask for new input from the user, and go back to the code where the user can alter A elements in … Software Development python | |
I have a datagrid. Right now, the datagrid has an event which is doubleclick on a row. it doesn't matter at which column i click,it will still be read as a row. this is its code: [CODE]<my:DataGrid x:Name="ProjectDG" LoadingRow="ProjectDG_LoadingRow" IsReadOnly="True" AutoGenerateColumns="False" Cursor="Hand" CanUserReorderColumns="False" CanUserResizeRows="False" CanUserSortColumns="False" ColumnHeaderHeight="25" HorizontalGridLinesBrush="#FF3B3B3B" VerticalGridLinesBrush="#FF3B3B3B" BorderBrush="{x:Null}" Foreground="Black" … Software Development vb.net | |
I've toyed around a great deal trying to get my calculations correct in this countdown program, but I keep getting the same result. Basically, I'm creating a program that will countdown from a users inputted number. At each second it will display whatever amount of seconds remaining. My problem is … Software Development java | |
Is it possible to add two separate arrays into one hash set? Software Development java | |
Hi, I'm writing code for a graphical map of a shopping center. Whilst writing the code I realised it would be simpler to be able to draw objects using "names" instead of values. E.g. g.drawRect(Asda); instead of g.drawRect(100,100,40,40);. Is this possible? I have tried writing various classes but I can't … Software Development java java-swing | |
So basically, I have this: [CODE=C] bool getDouble ( double & value, const string & prompt); int main() { char userSelection; do { cin >> userSelection; if (userSelection == '1') { double radius; if (getDouble (radius, "Please enter a value: ")) { cout << "good"; } else { cout << … Software Development c++ | |
Hello, I am currently working on a program that is supposed to do the following: I am supposed to take a data file of 5 student names that are in the following form: lastName firstName middleName. I am supposed to convert each name to the following form: firstName middleName lastName. … Software Development c++ | |
I need help in calculating the variance for randomly generated values (using srand(seed)). When i input 5 i should get 97359589.15265 but i am getting 1.29888e+010. I am almost positive i went wrong in the calculation of the variance but have no idea what to do in making it correct. … Software Development c++ |
The End.