234 Topics

Member Avatar for
Member Avatar for dsmith12

So my code is suppose to get information from the user and figure out how much funding the two professors get. My code runs twice but for some reason only the last entry is saved and outputted and my formula for calculating the new funding only outputs zero for some …

Member Avatar for stultuske
0
213
Member Avatar for jpsider

Hi all, I'm working on a school project and I am running into a problem, possibly more... This is my first post, so I am sorry if it ends up ugly. Here is a description of the project: This project focuses on demonstrating your understanding of classes and objects. Before …

Member Avatar for Philippe.Lahaie
0
9K
Member Avatar for Jnk

Hello I am a new to C++ and have some questions. I have two classes called Point and Square like this: [CODE] class Point { int x, y; public: int getx() const { return x; } int gety() const { return y; } Point(int a, int b) { x = …

Member Avatar for Jnk
0
454
Member Avatar for Hypnos_16

Hello All, I'm trying to create three independent animations that all occur in one main frame. I have to use the following methods in my code [CODE]--- Animate --- public interface Animate { void move( double x, double y); void changeConfiguration(); } --- Drawable ----- import java.awt.Graphics2D; public interface Drawable …

Member Avatar for NormR1
0
2K
Member Avatar for Eragah

[B][I]Hi I wanted to ask a quick question. I have two classes. And within my main class i am able to pass in variable to three variables EyeColorR to EyeColorB and able to send them the my Eye Class under the consturctor class Eye. the catch is I need to …

Member Avatar for Eragah
0
212
Member Avatar for prakhar_cool

[CODE]#include <iostream> using namespace std; class X{ public: int p; }; int main(){ int b; X obj; int X::*ptr = &X::p; obj.p = 100; cout<<obj.p<<endl; cout<<ptr<<endl; cout<<obj.*ptr<<endl; system("pause"); return 0; }[/CODE] When i run this program, i get the output as: 100 1 100. I understand why it shows 100...but …

Member Avatar for rubberman
0
258
Member Avatar for xxvicoxx

Hello guys well I have been working in this arraylist that is now driving me crazy! Bascially I wrote a CAR class which has some methods in it, however now I created an arraylist so it could store cars from the other class and at the same time have access …

Member Avatar for jeff-fisher
0
1K
Member Avatar for biogig

guys I've been trying to write this lab for my comp sci class for three days now. i've got to the point where it compiles but when I try to run it a table pops up that's says there's an error somewhere in the program that causes it to abort. …

Member Avatar for daviddoria
0
199
Member Avatar for FEC

Hi am trying to write a program and its giving me this error "cannot instantiate abstract class", can someone help me please? this is the code: Header: [CODE]#ifndef ABSTRACTGEOMETRICOBJECT_H #define ABSTRACTGEOMETRICOBJECT_H #include <string> using namespace std; class GeometricObject { public: GeometricObject(); GeometricObject(string color, bool filled); public: string getColor(); void setColor(string …

Member Avatar for Kanoisa
-1
377
Member Avatar for Reeseoo

Hi all new to this forum, just thought i'd post in here because i am having a bit of trouble with an assignment... basically i have this class in a header file called Product.h... [CODE] class Product { private: int _id; unsigned int _price; public: }; [/CODE] I access this …

Member Avatar for Reeseoo
0
517
Member Avatar for Kunal0

Hi, I have a basic understanding of C++ and was creating something myself with a class of 6 integers and a string what I want to do is to be able to find the mode values for each of the six integers and strings I have instantiated a set of …

Member Avatar for ravenous
0
280
Member Avatar for yousafc#

Please tell me deeply about classes and objects My Question are: What is class? Why we use class? How can we use class? what do help class? Please tell me and also tell how can I learn about class?

Member Avatar for thines01
0
205
Member Avatar for sieuwe

Hi, I've got a problem with my project. When I initialize an arraylist, the content is displayed and you can go through the arraylist by correctly answering the given word. But when I load a new arraylist from a file, the old arraylist is removed and the new one is …

Member Avatar for JamesCherrill
0
222
Member Avatar for thatscrap12543

Hi, networking is new to me in vb.net as I normally use third party components to do my networking like Winsock Orcas. However I want to make my own classes for networking. The following is what I have so far. It has problems. 1) Its disorganized...particularly the way I'm multi-threading, …

0
167
Member Avatar for Chuckleluck

Hello, I'm working on a game, and for this game, I created a class. There is one object of this class for each player in the game: [CODE]class PlayerClass { public: PlayerClass(Nationality); // Constructor ~PlayerClass(); // Destructor sf::Sprite PlayerFeet; sf::Sprite Arms; sf::Sprite Body; sf::Sprite Head; int HitPoints; GameClass CurrentClass; }; …

Member Avatar for Chuckleluck
0
178
Member Avatar for Triarius

Hi! I'm making a console game with cars. I am stuck trying to make the enemy car approach. If you have any thoughts or ideas, let me know! I'm thinking of using classes, but i dont know how to make them :) Is this legal? It probably isn't but here …

Member Avatar for Labdabeta
0
222
Member Avatar for emitremmit

I am having problems with my program to add and multiply two 4 bit binary numbers. The part in which I am currently having trouble is when I run the program the output for the addition function is not correct. Instead of displaying the correct answer it is just displaying …

Member Avatar for emitremmit
0
264
Member Avatar for haanjae

i have the server and client system. my problem is how the server enable to retrieve the client's bandwidth usage. i have the codes for bandwidth, but i am not sure how to do it because i confuse what extra codes should add in my client public partial class and …

Member Avatar for haanjae
0
329
Member Avatar for JwhateverJ

I'm writing an application launcher program. The launcher will launch applications based on the files found in the working directory. (Example: a folder containing files with the extensions .docx, .xlsx, .sln, and .txt, would give the user the option to launch Word, Excel, Visual Studio and Notepad loading any of …

Member Avatar for cox44
0
905
Member Avatar for metalix

Hey guys, I know this will have an easy answer, but I have been awake far too long to see it :P I am doing some coding with classes in python, and it just isn't working. Here is the code: [CODE] from bpy import * from os import * from …

Member Avatar for metalix
0
271
Member Avatar for javaNooblet

Hi all, I have a main GUI class as seen here: [CODE] import java.awt.*; import javax.swing.*; import javax.swing.border.*; /* * Class is to communicate with various other classes in the program to * create a roster for user based on their selection on GUI. */ public class MainGUI extends JFrame …

Member Avatar for stevanity
0
256
Member Avatar for varun.sharma

I made a code(test1.cpp) from an existing code of a game (ramble_shuffle.cpp) using classes...but the code gets stuck somewhere...Iam unable to find the fault...can some1 find please...the code hangs up.... Original game code : shuffle_game.cpp my code : test1.cpp

Member Avatar for mrnutty
0
47
Member Avatar for ozarka30

//All the c++ files in paste bin //////////////////////////////////////////// [url]http://pastebin.com/AzKPcN3v[/url] [url]http://pastebin.com/FrLpS0CV[/url] [url]http://pastebin.com/f3kYdYFW[/url] [url]http://pastebin.com/26h6yA3k[/url] [url]http://pastebin.com/cieYfDT8[/url] [url]http://pastebin.com/gV0sYb7q[/url] [url]http://pastebin.com/aT2c7bPs[/url] [url]http://pastebin.com/fQrjz3Sh[/url] [url]http://pastebin.com/sR0nrHXj[/url] /////////////////////////////////////////////// Hey, I need some help with this project I can't figure out what is wrong with my code. When I put print statements into the actual functions the output's seem to be …

Member Avatar for Stefano Mtangoo
0
132
Member Avatar for BoBok2002

Two things. First I need to resolve the linker errors I'm getting and I also need to learn how to create a text file in a C++ project file. I'm working on a stacks project with classes and I'm running into linker errors. Specifically it says: [B][Linker error] undefined reference …

Member Avatar for BoBok2002
0
369
Member Avatar for ryan.khan06

Hi guys, quick question, my objective is to make class somehow hold all values that i'm using in the program. I'd like the class to act as a database, if that's possible. My only problem is that, i'm passing an array from the main form to the class, and that …

Member Avatar for lolafuertes
0
134
Member Avatar for BoBok2002

Hi,I spent all night trying to figure this out. Could someone take a look and show me what I'm missing? I getting this compiler error: [B]unterminated #ifndef [/B]. But I have [B]ifndef[/B] at the beginning and [B]endif[/B] at the end of the class. [CODE]//Header file. //Class definition for teh stack …

Member Avatar for BoBok2002
0
42K
Member Avatar for ryan.khan06

I'm new to deployment of an application in C#, especially im running on a 64 bit OS. When i entered Visual Studio, i configured my application to run in 32bit, what happened was, it created a folder in the debug folder and it's name is "x86". When i checked it …

Member Avatar for Panathinaikos22
0
207
Member Avatar for Labdabeta

Is it possible to put a gap in a class definition? IE: [CODE]class a; class b { private: a test; public: a getA(){return test;} }; class a { private: int i; public: a(int i):i(i){} a operator+(int o)const{return a(i+o);} }; class b continued?//what? how? { void outputA(){cout<<a;} };[/CODE] This is just …

Member Avatar for Labdabeta
0
178
Member Avatar for techlawsam

Ok I think im getting better at these but not quite still have these implicit convert from int to string problems and the usual "does not exist in the current context" dilemma. [CODE]/* * */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Calories { class Calories { static …

Member Avatar for arunkumars
0
205
Member Avatar for Labdabeta

Is there a way to make a class visible only from within another class. i.e: [CODE]class myclass { private: class anotherclass { //stuff that only can be used from within a myclass function void dosomething(); float dosomethingelse(); }*anotherclasses; int numanotherclasses; public: int createanotherclass();//creates anotherclass object, puts it in the array …

Member Avatar for mike_2000_17
0
230

The End.