234 Topics
|
|
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 … |
|
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 … |
|
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 = … |
|
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 … |
|
[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 … |
|
[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 … |
|
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 … |
|
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. … |
|
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 … |
|
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 … |
|
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 … |
|
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? |
|
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 … |
|
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, … |
|
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; }; … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 |
|
//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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
|
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 … |
The End.