234 Topics

Member Avatar for
Member Avatar for kao

Firstly, apologies for the lack of commenting, it will be commented when the program works properly (lol), I'm creating a program which creates a test harness for 3 subjects, employees. This will display their name, ID and payrate per hour, it will then calculates the total amount in 37.5hours. Again, …

Member Avatar for rubberman
0
74
Member Avatar for MarvelWolverine

Hi, I am writing a program to solve the 8puzzle, but for some reason i am having more difficulty with the structure than the algorithm.... I have two classes, a tree and node class. My main problem is to put the nodes in an array in the tree class. Second, …

Member Avatar for Narue
0
299
Member Avatar for SSully

So simple problem. I need to have a division by zero validation in my constructor in this class. It is painfully simple, but I am just starting to learn classes and I just cannot figure out what I have to do. Would it be easier to just put the validation …

Member Avatar for Kanoisa
0
256
Member Avatar for CrazyProgrammer

Hey, was wandering if somebody could help we with some classes and objects, I haven't done c# in a while and i can't remember. Could someone tell me what String falls under in c#, ie allowing one to write somthing like [CODE] static void Main(string[] args) { string s = …

Member Avatar for CrazyProgrammer
0
155
Member Avatar for Thendi

Hi I am trying to put quicksort in my class like other methods and call it using the main method, I did it for Selection, Insertion, Bubble Sort and I need one more which is quicksort. I already made the calling code for quicksort but I don't know how to …

Member Avatar for Thendi
0
648
Member Avatar for Vindal

Hello everyone, I am having some problems with my code and allowing it to do what I want. I need within main to have the account balance from my class to be allowed to change value through "transactions" adding negative numbers for a withdraw and positive numbers to put in …

Member Avatar for abhimanipal
0
195
Member Avatar for v_janssens

I'm running a structural analysis program in VS2010 which iterates through a loop up to 4000 times. The program keeps breaking on me around the 960th loop and gives the following error Unhandled exception at 0x0040cd1d in Structural Analysis Program.exe: 0xC000005: Access violation writing location 0x00000000. The error seems to …

Member Avatar for v_janssens
0
458
Member Avatar for v_janssens

I have a class Matrix2D where the matrix is defined as vector<double> elements. I'm trying to use the function Gauss() to perform gaussian elimination on a matrix a [CODE]bool Gauss(Matrix2D& a) { [INDENT][/INDENT]//Gaussian elimination routine }[/CODE] The function itselt works perfectly and if I view the matrix a just before …

Member Avatar for v_janssens
0
161
Member Avatar for v_janssens

Hi, I'm writing a program for structural engineers that consists of a number of inherited classes. Specifically, I have a main() file which includes a class [I]element[/I] which includes a class [I]node[/I] which includes a class [I]matrix[/I]. [I]element[/I] includes variables of type [I]matrix[/I] and [I]node[/I], and [I]node[/I] includes variables of …

Member Avatar for v_janssens
0
191
Member Avatar for king.chang
Member Avatar for TrustyTony

Not my code but I think free to share. This is intended as beginning point of learning classes or learning data structures. Read the document [url]http://mcsp.wartburg.edu/zelle/python/python-first.html[/url] As first exercise, this does not work instead of the while loop in test part: [CODE] for i in numbers: print i [/CODE] [QUOTE] …

Member Avatar for TrustyTony
0
850
Member Avatar for gunnarflax

Hi! I have a question regarding a problem I've faced dealing with object oriented PHP. I'm used to always return a value after a method has been executed and then use the returned value in other methods. But that's because I've always done that in procedural programming. So I wonder …

Member Avatar for gunnarflax
0
158
Member Avatar for Vindal

I need to be able to loop and get information for up to 10 "BankAccount" arrays, but when I use less than 10 it gives me garbage and I don't know how to fix it. Here is my Code. [CODE]#include <iostream> #include <iomanip> using namespace std; class BankAccount { private: …

Member Avatar for Vindal
0
166
Member Avatar for Vindal

Hello, I am having some troubles with coding from one of Joyce Farrell's books here is a link showing the exact thing to which I am trying to figure out. [URL="http://books.google.com/books?id=akzWMS9_PYoC&lpg=PA327&dq=BankAccount%20Class%20from%20Joyce%20Farrell&pg=PA331#v=onepage&q&f=false"]Exact question[/URL] Here is the code I have written thus far. [CODE]#include <iostream> #include <iomanip> using namespace std; class BankAccount …

Member Avatar for jonsca
-1
160
Member Avatar for progr

I am having problems accessing a variable from one class to another. [CODE] class Player(pygame.sprite.Sprite): def rotateShip(self, rotAmt): radians = self.rotation * math.pi / 180 [/CODE] I am trying to use the variable radians from class Player to another class. radians only exists in 'rotateShip'. Thanks for your help in …

Member Avatar for Gribouillis
0
151
Member Avatar for jackmaverick1

Hi, I'm trying to make a program that will write to a file and tell it that the next time that the program is run to not do the first part of the program. [CODE] fstream install; //this is what all of the tutorials say to do. install.open(ready.txt); //this is …

Member Avatar for mike_2000_17
0
113
Member Avatar for trebor-pl

Hi, I am writing a program that allows to keep track of some racing records and to do this I need to be able to save objects on a external file and then load them with next startup of the program. As I am just a beginner I need your …

Member Avatar for trebor-pl
0
1K
Member Avatar for BenjyC

Hi, I am working on a piece of OOP which needs to be ran entirely by classes, by that meaning the main function should only create the first class and the rest of the program ran by member functions of various classes. Part of this task requires me to keep …

Member Avatar for BenjyC
0
175
Member Avatar for mingler

I have a problem with using globals within class scope. For example: [ICODE] $GLOBALS['test'] = "How are you?"; class great { [INDENT]function grace() { [INDENT] echo $test; echo $GLOBALS['test']; [/INDENT]} [/INDENT]} [/ICODE] Problem is, that neither of the echos produce any output. Is there a problem with accessing superglobals from …

Member Avatar for mingler
0
141
Member Avatar for dimProg

Hello, I'm new to c++ and we're just starting classes and objects in class. I've done a bit of programming in Java and I'm struggling to initialize an object using a variable. I must be missing something fundamental but I can't for the life of me figure it out. Here's …

Member Avatar for rickster11
0
1K
Member Avatar for JeremyK2

I have a class that stores all of my variables and functions (for our purposes, DataClass), and a few different windows form classes that use the public variables and functions in DataClass. I need to keep the values of the public variables in DataClass until the program closes. I set …

Member Avatar for rxlim
0
205
Member Avatar for RobZombie85

Hi Iam running into a problem when using classes and inheritance. I have a base class which contains a member function whos job it is to create and intialize some variables that are shared between other classes. The other classes are inherited from the base class and the variables are …

Member Avatar for Narue
0
139
Member Avatar for becool007

Hey so my project is an Average Calculator to calculate the average of a set of numbers. Anyways, I must make it in a GUI and I have chosen Win32. My problem now resides while trying to do the following: - When there is a paint request, to paint anything. …

Member Avatar for becool007
0
176
Member Avatar for warlord902

I configured a logger namely "My Log" in my main class which can write errors in a log file named mylog.txt Now I want to use this same file for all packages and classes there in. I tried to put this in other class Logger.getLogger("My Log") //Did nothing Now what …

0
130
Member Avatar for trebor-pl

Hi, i'm not very good at OOP, basically just started it. My program basically its like a system for a game shop, the main isn't fully done yet, however main isn't a problem. The other files must contain some kind of problem in them. Well enough of the talk, I'll …

Member Avatar for trebor-pl
0
337
Member Avatar for BanKuZ

hi all, I have a class A that has a char* var, operator and methods. In addition I have a global func(char*s). I would like to run this code from the main function by adding operators to my class, I need help writing them. [CODE]A* pA; ... A** ppA = …

Member Avatar for BanKuZ
0
253
Member Avatar for linux

[B]Ah! Never mind! I forgot you could embed classes such as:[/B] [code]class Heroes(): class Lords(): class Phill(): hp = 25 >>> Heroes.Lords.Phill.hp 25[/code] ------------------------------------------------------ I am attempting to write an RPG in Python. I am not worrying about the battle system or mapping quite yet, and am more focused on …

Member Avatar for richieking
0
5K
Member Avatar for gth759k

About a year ago, I built a simple ray tracer in Java, and now I'm trying to port it to c++, but I can't figure out how to get a couple of my classes to work together. It should be fairly strait forward, but its not working. Here is a …

Member Avatar for gerard4143
0
3K
Member Avatar for 100gram

Hello! Considering the competition on "classes"-related keywords is it realistic to create good SEO - first page on Google - and if so how long will it take?

Member Avatar for Living-seo-life
0
134
Member Avatar for J0shu

Hello everyone. I've been trying to implement a linked list in C++. I found this implementation on the web, where they created a struct for the list's nodes. When trying to add a new node to the list, I get this error: [B]List.C: In member function `bool Linked::addNode(Point)': List.C:23: error: …

Member Avatar for jonsca
0
531

The End.