462 Topics

Member Avatar for
Member Avatar for yousafc#

Please help me how can i creat a class and use in windows application for Studen Result card .[COLOR="red"]I want type below code in class and want to use in windows application for student Grade [/COLOR] [CODE] private string MethodGrade(float Avrage) { string Grade; if (Avrage > 91) { Grade …

Member Avatar for CsharpChico
0
99
Member Avatar for shazzy99

[COLOR="Green"]Trying to take input from user, put it in array and do the sorting[/COLOR] The code is: [CODE] #include <stdio.h> #include <conio.h> #include <stdlib.h> class Sort { static int array[5]; static int index; static int i; public: void insert(int num) { array[index] = num; index++; } int sortarr(const void *x, …

Member Avatar for Narue
0
183
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
75
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
310
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
257
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
156
Member Avatar for zaneulhaq

Hey guys i'll show the code first then explain my problem: [code=c] Class A { /*Variables required by A, B, C and D */ /*functions required by B and C*/ }; Class B { /*some of it's own functions and variables*/ }; Class C { /*some of it's own functions …

Member Avatar for Stefano Mtangoo
0
400
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
649
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
196
Member Avatar for ispeakbinary

I am learning c++ now and have encountered a problem in trying to create single digit addition, multiplication and subtraction math questions. The numbers used in the questions are randomly generated from 1 to 9 and when I try to print the answer for the corresponding question, I get a …

Member Avatar for prvnkmr194
0
197
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
459
Member Avatar for techturtle

Here's the scenario: I am coding a program that will display data from a database in a variety of fields. Some of the fields need to be read-only. Should have been simple just to set all those controls to read-only, except some of them are checkboxes, radio buttons and date …

Member Avatar for techturtle
0
401
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
193
Member Avatar for Colezy

Hi all, I am creating an application that includes and calls upon someone else's code. I need to slightly change the functionality of a constructor in their code but the class I need to change is buried away very deep. I considered inheriting from the class so I could change …

Member Avatar for Colezy
0
114
Member Avatar for king.chang
Member Avatar for Labdabeta

I need a few helps for some things that I just cannot get the syntax of! (I need these, and if you don't believe me I can post the reason) 1) Creating a function within a function 2) Creating a class within a function 3) Declaring a template function outside …

Member Avatar for mike_2000_17
0
139
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
851
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
159
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
168
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
163
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
152
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 Labdabeta

I am working on making a 'safetype' abstract class, which will have a complete set of pure virtual operator overloads to help make sure that a class inherited from it is safe to pass to virtual any function. The problem is that I don't know the syntax of a pure …

Member Avatar for Labdabeta
0
244
Member Avatar for emcyroyale

Basically this program uses an abstract class which 3 other classes extends to so that in the end an overridden toString() method will print out how many pages must be read for each class. Okay, well this program is for a class, but I am kinda of stuck because my …

Member Avatar for quuba
0
205
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 anuj_sharma

Hey Guys, I have the following code: [CODE] class A { int a,b; A(int i,int j) { a=i; b=j; } void showab() { System.out.println(a+" and "+b); } } class B extends A { int k=20; void showabk() { System.out.println("a="+a); System.out.println("b="+b); System.out.println("k="+k); } } class Test { public static void main(String …

Member Avatar for anuj_sharma
0
92
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
177
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
143
Member Avatar for Casper3912

I am in a distributed education programming class, our most recent assignment has me stumped with a error that is driving me insane. The IDE I have on my personal computer is missing some of the libraries I need(I believe), and when I remote desktop to my school's computer and …

Member Avatar for VernonDozier
0
355

The End.