132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for arsenal23114

Hello all, on an assignment my professor has asked us to "paint" a few different shapes on a canvas. (square, rectangle, circle, ellipse) to keep it simple, I had no problem breezing through the square and rectangle. to help you understand, here's a bit of code from one of the …

Software Development c++
Member Avatar for mrnutty
1
92
Member Avatar for DimaYasny

Hi all, I'm helping my girl out with her hw, (/me not knowing C at all, but someone has to help, right?) I am supposed to read user input, and then try to execute a given command plus the arguments in every given $PATH. I managed it all, but I …

Software Development c multithreading
Member Avatar for DimaYasny
1
296
Member Avatar for fabfour

hello guys and girls, as it's going to be quite obvious i'm not going to lie to you, this is coursework - however i really struggle with the programming aspect of my course and although repeatedly reading chapters in savitch's c++ guide and trying to understand my teacher i'm finding …

Software Development c++
Member Avatar for mrnutty
1
139
Member Avatar for ssheck1034

This is the first time I have done this, I hope I am doing it correctly. If not, guide me toward proper etiquette. I am a beginner, intro C++. I received a message from the compiler that I don't know how to fix. My question is where is the error?, …

Software Development c++ user-interface
Member Avatar for Narue
1
66
Member Avatar for Gribouillis

Joining together ordered sample points (xi, yi) when ths xi's are different yields a piecewise linear continuous (P1) function. This snippet defines a handy class to manipulate these functions. It allows computing the value and the slope of the function at each point, arithmetic operations, absolute value, truncation and linear …

Software Development python
Member Avatar for Gribouillis
1
598
Member Avatar for tasky23

I am writing a program that can read in statistics from a basketball team. The file lookes like this: Joe 3 114 9-19 1-3 2-4 3 15 4 2 1 2 3 21 I have created an array of structs to read all of them in I used ifsteam infile2("file.txt") …

Software Development c++
Member Avatar for jonsca
1
133
Member Avatar for shahab_abbasi

HI All, I am facing one problem that i have to do a vertical span for the table columns. But i am not getting any way to solve this problem. My input xml is as follows:- [CODE] <tabular frame="all" colsep="1" rowsep="1" orient="port" id="ctab1"> <tgroup cols="3" tgroupstyle="tabular" colsep="1" rowsep="1" align="left" charoff="50" …

Software Development xml
Member Avatar for witinnovation
1
277
Member Avatar for Mitja Bonca

1. My namespace is called "MyNameSpace". So... How to create that Form3 will inherit from Form2, which is already a child of Form1 (Form2 has class: public partial class Form2 : Form) I would like to creat like: class Form3 : Form2 And do not forget, all are windows forms. …

Software Development
Member Avatar for Geekitygeek
1
255
Member Avatar for sciwizeh

Hello all, As you may know by now, from my previous posts recently, I am working on a Paint application. My question, then, surprisingly does not involve Graphics or Swing. So my question is this: I would like to be able to have a directory such as "APP_HOME\tools" or something …

Software Development java java-swing
Member Avatar for sciwizeh
1
135
Member Avatar for stefanief

I am trying to write a point of sale program. I need to display the menu, the operator enters the lunch order. Total bill is calculated with sales tax, customer payment is accesped and change (if any) is calculated. order summary should be written to a log file that includes …

Software Development c++
Member Avatar for jonsca
1
116
Member Avatar for abd2

hi, this is the code for switch:[CODE] include <stdio.h> main() { int i=2; switch(i) { case 1; printf("i am in case 1\n"); break; case 2; printf("i am in case 2\n"); break; case 3; printf("i am in case 3\n"); break; default; printf("i am in default\n"); } }[/CODE] and this is the …

Software Development c
Member Avatar for mrnutty
1
156
Member Avatar for shenberry

I have a simple time tables that goes from 1 - 100. It takes like 6000 seconds to run. I figured I could break this down into a a multi thread program main thread for(int c = 1; c < 101; c++) { cout << c << "| "; for(int …

Software Development c++
Member Avatar for shenberry
1
154
Member Avatar for grib

First off, I'm a complete and absolute programming newbie and a bit of an old fart to boot, so I'd appreciate a gentle-but-firm correction if I'm pushing the wrong buttons here. I'm slowly working through a used copy of Prata's C++ 5th edition, but something's not working in my version …

Software Development c++
Member Avatar for Nick Evan
1
133
Member Avatar for Rsh>>>

[CODE=C] /* This program returns a run time error as follows: "Your code has stopped its execution with a non-zero (failure) exit value.This is generally due to run time Exceptions like Memory Access Violation and Floating Point Exception. Please check your code for run time Exceptions and try again." PLEASE …

Software Development c
Member Avatar for Ancient Dragon
1
90
Member Avatar for imagine88

Logic Used: Insert Pixel Data into a struct containing RGB values of the pixels read Data in a 3x3 array: | BGR(-1,-1) | BGR(-1,0) | BGR(-1,1) | | BGR(0,-1) | BGR(0,0) | BGR(0,1) | | BGR(1,-1) | BGR(1,0) | BGR(1,1) | Assign Average of all Blue,Green,Red components respectively to another …

Software Development algorithm c
Member Avatar for death_oclock
1
154
Member Avatar for foxmulder

Hi everybody! I dont want to lie and say this isn't an assignment because it is, and I have really got stuck here. The assignment was to create a lottery-program which randomly displays 10 ordinary numbers and 5 extra numbers, all in between the interval of 1-50. The problem is …

Software Development c++
Member Avatar for foxmulder
1
102
Member Avatar for wmsigler

My heapsort is not functioning the way it should, and I was wondering if perhaps one of you could help point me in the right direction. Much thanks in advance should you care to look! :) If it helps anyone, I posted it on pastebin.org with syntax highlighting: [url=http://www.pastebin.org/55997]http://www.pastebin.org/55997[/url] Source …

Software Development c++ open-source
Member Avatar for wmsigler
1
167
Member Avatar for Doughnuts

Hi everybody, I have a problem with output files. I have installed Code::Blocks and MinGW, replacing my old Borland compiler. I am trying to make a program that uses arrays and files: [CODE]#include <iostream> #include <fstream.h> #include <conio.h> #include <string> #include <stdlib.h> #include <cassert> using namespace std; void Save(ofstream& f, …

Software Development c++
Member Avatar for bamcclur
1
113
Member Avatar for nobodycool

Hello there, I am working on an assignment for school and I am having a hard time understanding the concept of an array of objects. I am required to create an array of Music objects so that I can search through them via a binary search and make changes as …

Software Development java
Member Avatar for javaAddict
1
147
Member Avatar for iDevelop

I'm new to using C++ but I thought I would give it a try. The goal is to delete all files and folders located in %userprofile%\Local Settings\Temp without deleting the folder called "Bluezone" located in the Temp folder. Any help would be appreciated.

Software Development c++
Member Avatar for Excizted
1
130
Member Avatar for Stefano Mtangoo

I'm new to Java, but will eventually want to use GUI for my Desktop applications. So as usual in any language, GUI toolkits are "debatable". In Python (My current "mother toungue") We have PyQT vs PyGTK vs wxPython and it is a good debate. I would like to hear your …

Software Development gui java java-swing
Member Avatar for Stefano Mtangoo
1
179
Member Avatar for Jelmund

Hello people :) My teacher gave me a new project to work on. I need to write an application that output all the letters of the alphabet in a random order. I've made some applications before but im still kinda new to this. Could any of you give me a …

Software Development c
Member Avatar for zortec
1
236
Member Avatar for sexyzebra19

I'm trying to implement the algorithm described here under 'definition', [url]http://en.wikipedia.org/wiki/Laguerre%27s_method[/url] To summarise it takes an initial guess 0, and then iterates to find the root. In lines 68 to 71 I was hoping this would exit the function, i.e. when the root is found...but it's still carrying on. Can …

Software Development algorithm c++
Member Avatar for Clinton Portis
1
204
Member Avatar for icygalz

[CODE]void findMax(int arr[], int n, int* pToMax) { if (n <= 0) return; // no items, no maximum! int max = arr[0]; pToMax = &arr[0]; for (int i = 1; i < n; i++) { if (arr[i] > max) { max = arr[i]; pToMax = (arr+i); } } } int …

Software Development c++
Member Avatar for Narue
1
4K
Member Avatar for Clinton Portis

A lot of people have questions about how to load a text file using file I/O. There seems to be 2 popular methods to loading a text file: Use fstream's >> extraction operator. Simple enough, load the file directly into individual containers, word at a time, but you lose your …

Software Development c++ file-system ios
Member Avatar for mrnutty
1
195
Member Avatar for DdoubleD

[B]Overview:[/B] Oddly enough, MS never created a TreeViewDrowDown or equivalent. What I mean, is a control that looks and acts like a [icode]ComboBox[/icode], but contains a [icode]TreeView[/icode] instead of just a list when in the expanded drop-down mode. I've never understood why they haven't, but I always seem to want …

Software Development
Member Avatar for Diamonddrake
1
1K
Member Avatar for HelpMeIT

I need a way of adding data to a database using my delphi form i can handle the sql to add data to a database on ms access but i just do not know how to do it through a delphi form. In other word i just need to know …

Software Development delphi pascal sql
Member Avatar for fayyaz
1
211
Member Avatar for cmk2901

Hi, I have a char* buffer that is 1024 bytes in size, and am trying to write an int to a particular offset in the buffer, in this case 0, but all offsets have the same problem. I initialize the buffer to some values when I first start up. For …

Software Development c
Member Avatar for Ancient Dragon
1
170
Member Avatar for nccsbim071

Hi everybody I have been developing windows client application in .net framework 3.5. The system is supposed to copy the remote mysqldb and restore my local mysqldb with all the schema and data withing remote schema to my local mysqldb with the same database name. Well i found a solution …

Software Development mysql
1
115
Member Avatar for markeen

[code] #include<stdio.h> #include<conio.h> int main() { int x[5], y[5], z[5], i, d; for(i=0;i<5;i++) { printf("Enter int%d: ", i); scanf("%d", &x[i]); } if((x[0]>x[1]) && (x[0]>x[2]) && (x[0]>x[3]) && (x[0]>x[4])) { y[0]=x[0]; if((x[1]>x[2]) &&( x[1]>x[3]) &&(x[1]>x[4])) { y[1]=x[1]; if((x[2]>x[3])&&(x[2]>x[4])) { y[2]=x[2]; if((x[3]>x[4])) { y[3]=x[3]; y[4]=x[4]; } else if((x[4]>x[3])) { y[3]=x[4]; y[4]=x[3]; } …

Software Development c
Member Avatar for Ancient Dragon
1
120
Member Avatar for llemes4011

I'm working on an rpg game, and one of the big issues that I had (have), is having the players actions change around other objects. For example, normally the "a" key would attack, but when next to a person, it would trigger a dialog sequence, and when next to a …

Software Development java
Member Avatar for llemes4011
1
81
Member Avatar for Bladtman242

Hi Guys, I am new to java and I need some help:) First of all: I admit, I did not write this, I re-wrote a bit of it for my needs, and therefore may not be able to fully understand parts of it. The thing is, the script accepts only …

Software Development java
1
82
Member Avatar for itsmekarthik

please help in writing to excel sheet using java program. Actually I know how to write to a text file but I don,t have any idea about this writing to an excel sheet. I would be grateful to you if you help me.

Software Development java
Member Avatar for masijade
1
38
Member Avatar for denizen08

[CODE=C++]polynomial polynomial :: derivative(void) { polynomial outpoly; outpoly._coef = new double [_degree]; outpoly._degree = (_degree-1); for(int i=0; i<(_degree); i++) { outpoly._coef[i]=(i+1)*_coef[i+1]; } return outpoly; } //header: #pragma once #include <complex> #include <iostream> #include <string> #include <sstream> using namespace std; class polynomial { private: double * _coef; int _degree; public: // …

Software Development c++ os-x
Member Avatar for Narue
1
170
Member Avatar for cmsc

I want to make a dynamic array. but when I view the array, I think there's something wrong with the index part. Please help. Thanks! here's my code: [CODE] #include<stdio.h> main(){ int* a; int number; int choice; int index = 0; int head; while(choice!=4){ printf("\tMENU\t\n"); printf("[1] add number to array\n"); …

Software Development c
Member Avatar for cmsc
1
90
Member Avatar for Ecliptical210

Hi guys, so I have this project where the requirements are as follows. Create a class called Car, which serves to represent a particular vehicle at a car dealership. Consider that each car has the following properties, entered by the user (all value ranges should be error checked): Sticker price …

Software Development java java-swing
Member Avatar for Ecliptical210
1
146
Member Avatar for turtlez

Hello, i need help with a basic code issue, i ave posted the code [URL="http://turt2live.zxq.net/cpp/hoomin.html"]here[/URL] because it is too long to post... The issue occurs in this section of code: ...(more before) void getInput(int num){ char = one[1]; char = two[1]; char = three[1]; char = four[1]; ...(more after) saying …

Software Development c++
Member Avatar for turtlez
1
123
Member Avatar for Gerard I MUFC

Hello everyone, pleased to be on the forum. I'm currently undertaking some game development in Visual Studio, in my spare time. I've been programming for a few months, in Java, and now am having a go at C#. I have however run into a little snag with lists. I'm trying …

Software Development c c# c++ visual-studio
Member Avatar for Gerard I MUFC
1
354
Member Avatar for MeBjess

I have been working on a basic accounting program, the accounts were supposed to be stored in a array, but I never got that part of the program working. Is there anyway I can get a sample of hash code that would help me understand what I need to do? …

Software Development c
Member Avatar for MeBjess
1
90
Member Avatar for Fajer91

Hello everyone i'm a new member , i need ur help with this code , i want to write a for loop that assigns the 3rd row of the array to 0,, and then print out the array after setting the 3rd row to 0.

Software Development c++
Member Avatar for rahul8590
1
123
Member Avatar for confusedndazed

My question: What is the output of the code corresponding to the following pseudocode? [code=text] Set y = 0 For (i = 0; i<=6; i=i+3) For (j = 0; j<=15; j=j+5) Set y = y + 1; End For (j) End For (i) Output y [/code] This is what I …

Software Development c++
Member Avatar for rafta
1
124
Member Avatar for sahasra

Hi, I am new to this site. Can you please help me with this. I have written a C program and i m getting the following errors 1) " 'puts' was not declared in scope " the same error for 'gets' and 'itoa' command...i have included stdio.h,string.h,stdlib.h,math.h as the header …

Software Development c
Member Avatar for kenji
1
140
Member Avatar for beatenbob

Hi all. Just a simple question but I SERIOUSLY need some help from you guys for my programming assignment. The assignment given was water jug problem. Now my question is, does C allow for the creation of dynamic array during a recursion? Suppose I have another function, which returns a …

Software Development c
Member Avatar for gerard4143
1
411
Member Avatar for dena

hi please can any one help me in my shell project like this : Develop a c program which serve as s shell interface that accepts user command and then executes each command in separate process. The shell interface provides a command prompt ( sh> ) after which next command …

Software Development c user-interface
Member Avatar for dena
1
725
Member Avatar for v_rod

hi! i am making a prototype of an online stock trading application in python using tkinter module for Gui and a csv file for all the stock market data. i wish to know if there is an api using which stock prices can be changed if i keep all the …

Software Development api gui python tkinter
Member Avatar for v_rod
1
117
Member Avatar for kolosick.m188

I am having a slight problem implementing this code. What I need to do is take a list of 16 unsigned characters and permute the bits according to IPTable. 0 in IPTable refers to bit 0, 1 refers to bit 1, etc. Here is my code which isn't working. [code=c] …

Software Development c
Member Avatar for Dave Sinkula
1
107
Member Avatar for c.pentasuglia

Okay so i am started a project for a java class of mine, i would like to make the game simon, you know where there are four different colored buttons and it plays random sequences and you have to repeat them. I was thinking of using the random function, but …

Software Development java
Member Avatar for donaldw
1
186
Member Avatar for d0pe

I need to create a function that returns a number with the amount of characters in common among one string and a vector of them. [CODE]public int sameChars (Vector<String> otherStrs){ int result = 0; String original = "aab"; for (int i=0; i< original.length(); i++) { char aux = original.charAt(i); String …

Software Development java
Member Avatar for d0pe
1
105
Member Avatar for bufospro

Hi, I want to make a program that reads a string. But I would like to read only characters, neither numbers nor special characters(@,#$%^&*()!). Also, no spaces between characters. [CODE] #include <stdio.h> #include <string.h> char *enter_a_string(int maxcharacters) { char *ptr; int len; printf("Enter string : "); char array[50]; do{ scanf("%s",array); …

Software Development c
Member Avatar for bufospro
1
107
Member Avatar for eskaflowne

now I have never posted before so I hope this is in the right spot/format.. this problem is driving me insane. I need prove the Goldbach conjecture that is, "every even integer n > 2 is equal to the sum of 2 prime numbers." Then with a starting point and …

Software Development c
Member Avatar for flipjoebanana
1
111

The End.