462 Topics
| |
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 … | |
Hello everybody I [I]thought[/I] I understood inheritance but it turns out I don't. I am creating an SDL/OpenGL mini-GUI library. I have a master class, GUIComponent, with subclasses such as TextLabel under it. I have a vector called guiList that is initialized as [ICODE]std::vector<GUIUnit*> guiList[/ICODE] (it's extern'd and initialized elsewhere; … | |
Hi community First I want to thank everyone who will look through this, because it's a longer post. I'm currently reading a book on AI by Mat Buckland. I'm re-building Mats entitymanager, though I just copied it. He used std::map to collect all entities as pointers which are cross referenced … | |
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 am doing a multiple-file project and i come across a difficult obstacles. I want your help, DaniWeb readers on this problem, which i find very strange: [CODE] #include "stdafx.h"//i have included vector header here #include "globals.h" #include "functions.h" using namespace std; #ifndef CPIECE #define CPIECE class CPiece { … | |
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 … | |
Hi!! my application have 2 frames including tabel 1,tabel 2 when run time i insert values though textfileds to tabel 1 ,after inserting 5 or more then i click next button then display other frame with tabel 2 and tabel 2 must auto filled. my problm is last row(i already … | |
Suppose the xMethod() is invoked in the following constructor in a class, xMethod() is _________ in the class. public MyClass() { xMethod(); } A. a static method B. an instance method C. a static method or an instance method what is the answer a or b or c | |
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 … | |
A question regarding inheritance implementation. Let's say we have 2 classes: [CODE]class B { public: int x; // for the sake of argument it's public, don't stone me }; class D: public B { public: int x; // again x, i know ... stupid dilemma };[/CODE] Now, if you will … | |
[CODE]#include <iostream> using namespace std; class bike { public: bike () { cout << "Bike: no parameters\n"; } bike (int a) { cout << "Bike: int parameter\n"; } void color(int a,int b) { cout<<"Inside Bike Color"<<endl; } }; class ducati : public bike { public: ducati (int a) { cout … | |
I've tried searching for articles that relate to this issue, but all I keep finding are articles about people who don't know how to define constructors/can't call the parent constructor/etc and I think this will cut straight to the chase. The problem code is as follows: [CODE] #include <stdio.h> class … | |
Ok So Im writing a app which would pick the 'cheapest' plan for a consumer. While writing this I came across something puzzling to me. Why is it starting after the default constructor, the first CellPlan has three arguments passed too it and then the next one two and then … | |
Hello all, I'm trying to inherit a "CarPanel" I created using arrays to draw various shapes in order to make a car. Now I am trying to essentially create a subclass that inherits that class, but add a Timer Action to move the car across the screen. I got it … | |
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 … | |
Hi everyone! When i compile my small piece of code it gives me the error [COLOR="Red"]C2512 : No appropriate default constructor available[/COLOR] this is my definition of class person: [CODE] // Person.h // A class defining a person #pragma once #include <iostream> #include <string> #include <functional> using std::cout; using std::endl; … | |
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 | |
Ok So I have to create a Date Class that will allow me to return the current day with data members of month , day, and year this is what I have for from my Main() class: [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DateApp2 { class DateApp … | |
//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 … | |
[CODE] Public Class aaMyForm Inherits Windows.Forms.Form [/CODE] Added some controls. Build it, add the .DLL as reference to my other project. In my other project: [CODE] Imports MyLib Public Class XForm Inherits aaMyForm [/CODE] The events from aaMyForm execute correctly but the controls added to it are not shown on … | |
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 … | |
Hello all, im doing this problem which will allow a store to return a invoice, I have two classes and I guess I am at the very end and need help fixing some things so I can finally have the program execute: Class1: "Invoice": [CODE]using System; using System.Collections.Generic; using System.Linq; … | |
I am currently creating a queue ADT for one of my classes in college. We are using a linux ssh server for compiling our programs, but i am writing the code in windows. When i compile i get no errors, but when i run it goes fine until it hits … | |
Dear Daniwebbers, I have a problem regarding the calling of methods on a protected parent object from within a child object, the protected parent object being a child object of the same class. I have a class HostileArea, wich has a "protected DungeonRoom[][] dungeon", DungeonRoom being a child of HostileArea. … |
The End.