132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for YuriR

I'm having issues with this checkbook program. The probelm is when I deposit money into the balance it still shows me the old overdrafted balance. I am thinking that it has to do with my: [CODE]bal += CreditDebit;[/CODE] Here is my code so far: [CODE]#include <stdio.h> #include <stdlib.h> int main …

Software Development c
Member Avatar for WaltP
0
127
Member Avatar for HoneyBadger

Hi, I am trying to split a string and return specific words. I know that using string.split() turns the string into a list of specific words. But how would I go about returning specific words? like the ones that contain certain letters? This is my code so far: [CODE]def e_words(m): …

Software Development python
Member Avatar for TrustyTony
0
189
Member Avatar for DallasFan3

Right now Iam writing a program that will convert english into piglatin. Ans I have pretty much finished the program, but Iam stuck and need help. When I run the program, nothing happens after I type in the users input. What am I doing wrong. Heres my code, [code]import java.util.Scanner; …

Software Development java
Member Avatar for kezkez
0
1K
Member Avatar for digan

Hi, i have to write a program that gets users to enter some numbers and it has to sort them in descending order. I've nearly finished but i just cant get it to sort in descending order, only ascending (using bubble sort). Here is the program: [CODE]#include <cstdlib> #include <iostream> …

Software Development c++
Member Avatar for Anuradha Mandal
0
2K
Member Avatar for triumphost

KK the code below is a loop part of my main program I just cut it out and made it compilable.... This is the problem... When the user enters a number greater than 2, its supposed to tell them to retry because that was not in the options menu... that …

Software Development c++
Member Avatar for WaltP
0
187
Member Avatar for Rez11

I'm having problems with the code from my text book. I need modify the class so it throws an exception instead. The problem is that I get errors from the original code from the book. Any help on how to fix it would be great. Thanks in advance! ERROR: [COLOR="Green"]Error …

Software Development c++
Member Avatar for Rez11
0
1K
Member Avatar for zaaephod

Hello again! This is something that's been bugging me for a while. Say I have a dgv with several columns and rows of data. Many times while working with the grid, it's necessary to know the number of the column, but all you know is the column header name, or …

Software Development vb.net
Member Avatar for zaaephod
0
1K
Member Avatar for jems5

I am writing a program that reads text but must ignore case, spaces and punctuation while evaluating a string for palindrome. When I use the following the case issue is solved. [CODE] String str = ""; if (str.toLowerCase().charAt(LHS) != str.toLowerCase().charAt(RHS)) [/CODE] ...but when I use the following I get IndexOutOfBoundsException …

Software Development java
Member Avatar for jems5
0
3K
Member Avatar for Awesomeness

I have an application I'm making... And it has a canvas in it. The problem is, on the y axis, my canvas is offset by ten pixels downward and I can't figure out why. You can see what I'm talking about in the screenshot. Do you know what's wrong?

Software Development gui java
Member Avatar for Awesomeness
0
122
Member Avatar for Stefano Mtangoo

Hi, I have decided to learn C# and since I have good knowledge of C++, I hope it would be easy. I have faced an error I dont understand. It says [COLOR="Red"]Polygon' does not contain a constructor that takes '1' arguments (CS1729)[/COLOR] AFAICS, all is well and constructor does take …

Software Development
Member Avatar for Stefano Mtangoo
0
200
Member Avatar for Caeon

This is what my program is supposed to do: [LIST=1] [*]Print the vector (m1) [*]Print the matrix (m2) [*]Multiply the vector and matrix together and display results [/LIST] The only thing wrong with my program is that I can't quite get the right results displayed. The correct display of values …

Software Development c matrix-multiplication
Member Avatar for Caeon
0
12K
Member Avatar for frogboy77

Hey, i know this is a commonly asked question (and will probably get burned for asking it again) but wanted an up to date answer so here we go. I'm trying to learn to program in c++ purely as a hobby. I have recently spent some time doing problems at …

Software Development c++
Member Avatar for gerard4143
0
222
Member Avatar for NewOrder

hi, i created a webpage explaining what polymorphism is. could someone point to me any inaccuracies or additions that i could make? [CODE]Polymorphism Syntax Polymorphism is when one type can take the form of a related type. Here is an example: DerivedClass B = new DerivedClass(); B.DoWork(); BaseClass A = …

Software Development
Member Avatar for NewOrder
0
127
Member Avatar for James0l9l

The first time my code loops through my nested while loop it works. But the second time it doesn't- I don't know why. Could someone tell me the reason. [CODE]m = [['__', '__', '__'],['__', '__', '__'],['__', '__', '__']] z=1 count=9 f=[0,2] from random import choice w=choice(f) from random import choice …

Software Development python
Member Avatar for woooee
0
102
Member Avatar for pacers10

I need to define a function that translates an sentence from present to past. A. put all words in lower case and omit all punctuation B. Plural and singular verbs should be recognized C. verbs ending in "y" change to "ied" D. verbs ending in "e" add "d" E. other …

Software Development python
Member Avatar for woooee
0
137
Member Avatar for skiabox

I am trying to use a vla (variable length array) in my code but I see that the array is not initialized properly when I debug the program. Here's the code : [code] #include <stdio.h> #include <stdbool.h> int main (int argc, const char * argv[]) { // insert code here... …

Software Development c
Member Avatar for skiabox
0
138
Member Avatar for ChaosKnight11

So I started with C++ recently, and it's still very new and difficult for me but I think I'm starting to get the hang of it. Now I want to start making my first real-world app. I downloaded an SDK for a mobile application API and I want to make …

Software Development api c++
Member Avatar for Stefano Mtangoo
0
147
Member Avatar for shakssage

I can't think of a way to get rows out of a table. It was easy doing it with VB.Net and I'm just finding vc++ really difficult. This is what I have so far. I've connected to the database file and I am able to get the data shown onto …

Software Development c++ dataset open-source sqlite
Member Avatar for Stefano Mtangoo
0
261
Member Avatar for vbx_wx

Is there any diference between: [code] X* x = new X; X* y = operator new X; [/code]

Software Development c++
Member Avatar for arkoenig
0
94
Member Avatar for 123a

Hi, i only know the Java basics and really need help! I have a class called temporaryHolder which holds an arrayList of 54 cards. However, I need to get elements out of this arraylist and need to add them to stacks in another class. Q1) How can I access all …

Software Development java
Member Avatar for 123a
0
78
Member Avatar for LianaN

Hi! I've decided to open a new thread for discussing the problem with uploading a file to a SUB-FOLDER at the FTP Server. So, I'm using Apache Commons library and I can upload my file to the Home Directory of the FTP server. However, if I want to upload it …

Software Development apache client-server file-system java
Member Avatar for LianaN
0
1K
Member Avatar for baraah

hi how can i make program using for loops only that display the output below * * ** ** *** *** **** **** ***** ***** ***** ***** **** **** *** *** ** ** * *

Software Development c++ display
Member Avatar for peter_budo
0
165
Member Avatar for BlueZephyr

I get this error: variable or field 'calc_score' declared void and I am pretty much stuck. Here is my code, it obviously isn't finished but I need to be able to get this void to compile to continue on. [CODE] #include <fstream> #include <iostream> #include <cstdlib> #include <iomanip> using namespace …

Software Development c++
Member Avatar for packetpirate
0
274
Member Avatar for baltik08

problem: the user will input an integer for example 12345 (5 digits) and the output should be: 12345 12345 12345 12345 12345 // depending of how much digit you input or if the user will input lets say 123hi and the output should be 123hi 123hi 123hi // the program …

Software Development c++
Member Avatar for Dhruv Gairola
0
794
Member Avatar for choosenalpha

Hello All, I am trying to find where the error is when I compile this Perl script but I can't seem to locate it. It is stating that it "Can't find the string terminator "FOOTER" anywhere before EOF at reddrill.pl line 54. I have went through and checked for extra …

Software Development html-css perl vbscript
Member Avatar for d5e5
0
210
Member Avatar for nichu

i am doing a desktop application using netbean6.8 how to show error message if i didnt enter mobile number textbox pls help me....

Software Development java
Member Avatar for apines
0
93
Member Avatar for Lanor

Hi...I am not able to input text file correctly as desired...... data.txt -------- Jim A James A+ Smith Cathy D Dazy Peter C I am suppose to input the above file and fill the above data in two seperate arrays. For the second column, I am suppose fill NULL value …

Software Development c++ file-system ios
Member Avatar for WaltP
0
100
Member Avatar for mrclark

i am creating a web-album for my site. what i am trying to do, is on the homepage, if a user clicks on a specific thumbnail, it will got to the album using a #image[number] tag. i have this code so far for changing the images based on the tag …

Software Development html-css xml
Member Avatar for mrclark
0
88
Member Avatar for Brickmack

Is there a way in python to look through a file line by line and find a word in that line, but only if the word is the first word in the line? Like if it was looking for the word "apple" then it would only notice if the line …

Software Development apple python
Member Avatar for richieking
0
955
Member Avatar for Donnovan

Hi everyone, how do i push item with a givin index in a linkedlist. e.g. linkedlist.add(element e, int index); this is my function [CODE]public void push(Student s, int index){ if(isEmpty()){ start = s; }else{ last.next = s; } last = s; size++; }[/CODE]

Software Development java
Member Avatar for Donnovan
0
101
Member Avatar for sairakhalid

i want to know whats the error over here. i just want to store the three value in a node and making a linked list but after storing two nodes that is headptr and than temptr, when the third node is made it stops. I think my error is somewhere …

Software Development c++ linked-list
Member Avatar for sairakhalid
0
177
Member Avatar for LianaN

Hi! I would like to develop a software that will allow me to find a file (using JFileChooser) on a local machine and save it to a remote machine. I know an IP address of the remote machine. Please, give me some explanations or a link to some tutorials regarding …

Software Development java
Member Avatar for LianaN
0
3K
Member Avatar for ana_1234

myint.h [CODE]#include <iostream> // so that we can overload << and >> using namespace std; class MyInt { // these overload starters are declared as friend functions friend MyInt operator+(const MyInt& f1, const MyInt& f2); //friend MyInt operator*(const MyInt& f1, const MyInt& f2); /*friend MyInt operator++(MyInt& f1, int); // postfix …

Software Development c++ visual-studio
Member Avatar for ana_1234
0
399
Member Avatar for oggiemc

Hi guys, Just wondering how i would access a particular variable from an object in an array?? Consider the code: [code=c]void Animal::arrayDisplay(){ Animal ani; Animal* arry[3]; string n,c; int a; for(int i = 0; i<3; ++i){ cout <<"Input name:" <<endl ; cin>> n; cout <<"Input color:" <<endl ; cin>> c; …

Software Development c++
Member Avatar for gerard4143
0
157
Member Avatar for rcanter

Having a little problem with my code. I'm thinking it is a name somewhere that is the problem, but cannot find it. Getting warning that inventoryTable is never assigned to and will always have default value null. I have read that this warning can be disabled but when I try …

Software Development
Member Avatar for rcanter
0
205
Member Avatar for samsons17

Hi all :) Recently i got a an assignment to be done which need to deal with c++ pointer.. This is the question : [B] Write a function that accepts a pointer to a C-string as its argument. The function should return the character that appears most frequently in the …

Software Development c++
Member Avatar for samsons17
0
409
Member Avatar for NewOrder

when is it called in an inheritance hierarcy. is the base static constructor called before the derived static constructor?

Software Development
Member Avatar for Momerath
0
80
Member Avatar for Buffalo101

I want to set up a connection to a Microsoft SQL Server 2005 express on my PC. [code=java] try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection( "jdbc:mysql://localhost/db1","xxxx","yyyy"); Statement stmt = con.createStatement(); ResultSet rs = stmt.executeQuery("SELECT nume FROM tabel1"); while (rs.next()) { String s = rs.getString("name"); textArea.append(s); } } // Catches any …

Software Development java sql
Member Avatar for Buffalo101
0
251
Member Avatar for blogoot

In ANSIC use semaphores and mutex? How to exchange messages between the programs?

Software Development c
Member Avatar for gerard4143
0
135
Member Avatar for HBK_100

I have the following in the txt file [CODE] 1 Single.Standard Standard Empty ......... ........ 70 2 Single Standard Empty ........ ....... 70 [/CODE] I ahve the code below buts its not deleting the selected id [CODE] while(!file.eof()) { file >> roomnumber >> category >> type >> status >> datein …

Software Development c++ file-system ios
Member Avatar for HBK_100
0
103
Member Avatar for mangopearapples

Is there anyway to play an mp3 file in java? P.S I'm new here, hello world?

Software Development java
Member Avatar for mangopearapples
0
172
Member Avatar for purijatin

The problem is that when we use multiple threads and each containing System.out.println(). It doesnt print at time according to what i think it shoud On implementing the below 2 codes: [CODE] import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.SocketException; import java.util.concurrent.LinkedBlockingQueue; import java.util.logging.Level; import java.util.logging.Logger; class E { LinkedBlockingQueue<DatagramPacket> li = …

Software Development java
Member Avatar for purijatin
0
235
Member Avatar for sairakhalid

How can i declare 2D array in visual C++ 6.0 as a member of class? this syntax of mine is giving error. class sparseadd { int *p; int row; int col }; sparseadd::sparseadd(int r, int c) { row = r; col = c; p = new int[r][c]; // here i …

Software Development c++
Member Avatar for sairakhalid
0
130
Member Avatar for alex-VX

hi im making a task manager and want to get cpu usage of a process this is how my code looks now [CODE=vb.net] For Each proc As System.Diagnostics.Process In pList Dim lstStuff As ListViewItem = New ListViewItem() lstStuff.Text = proc.Id.ToString lstStuff.SubItems.Add(proc.ProcessName) Try lstStuff.SubItems.Add(proc.TotalProcessorTime.Milliseconds.ToString + "%") Catch End Try lstStuff.SubItems.Add(proc.WorkingSet64.ToString()) lstStuff.SubItems.Add(proc.Responding.ToString) …

Software Development vb.net
Member Avatar for AndreRet
0
2K
Member Avatar for svatstika

Dear Friends! I want to draw a bouncing ball directly on form using component timer. I think that I should draw a ball then change its coordinates. Like this: [CODE] public partial class FormMain : Form { int mx = 10; int my = 10; public FormMain() { InitializeComponent(); } …

Software Development c#
Member Avatar for ddanbe
0
242
Member Avatar for ceyesuma

Hi. I can't figure out how to remove an element from an array. will I have to move get the element to be removed and swap it out with the last element and use the pop()?

Software Development java
Member Avatar for ceyesuma
0
321
Member Avatar for SpyrosMet

Hi everybody. I need to pass the value of a pointer to a struct for a server program to a client program. my code is the following for the server: [CODE] write(ns, &fixedparkpnt, sizeof(fixedparkpnt)); write(ns, &fixeddriverpnt, sizeof(fixeddriverpnt));[/CODE] and for the client: [CODE] read(sock2, &fixedparkpnt, sizeof(fixedparkpnt)); read(sock2, &fixeddriverpnt, sizeof(fixeddriverpnt)); [/CODE] sock2 …

Software Development c client-server
Member Avatar for SpyrosMet
0
156
Member Avatar for birdlover2010

Hello, I am a current Java student and am having a problem when I run my compiled program from an in chapter lab assignment called "Stock Tracker". I receive a message from a dialog box "Cannot locate sun.jdbc.odbc.jbcOdbc Driver. Class not found exception creating database object. Following are a list …

Member Avatar for ~s.o.s~
0
274
Member Avatar for kuchick32

[code] #include <fstream> #include <iostream> #include <cstdlib> using namespace std; int main () { char out_file_name[15]; cout<<"Enter the name of your output file: "; cin>>out_file_name; ifstream input; ofstream output; cout<<"Begin editing files.\n"; input.open("Input.txt"); if (input.fail()) { cout<<"Input file opening failed.\n"; exit(1); } output.open("output.txt"); if(output.fail()) { cout<<"Output file opening failed.\n"; exit(1); …

Software Development c++ matrix-multiplication
Member Avatar for kuchick32
0
189
Member Avatar for AlvinLiu

[CODE] public class Reservation { private String firstname; private String lastname; private String address; private String name; private int licenseN; private String date; private int daysN; private String type; public Reservation(String f,String l,String a,int lpn,String dt,int nd,String tp) { firstname = f; lastname = l; address = a; licenseN = …

Software Development java
Member Avatar for AlvinLiu
0
2K

The End.