462 Topics
| |
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 … | |
Hello.. I'm new with java and have some problem with my assignment. I want to write a class named phoneBookEntry that has field for a person name and phone number. The class should have a constructor and appropriate accessor and mutator method. Then, write a main class that create five … | |
I'm an amateur web developer trying to move toward more professional coding practices, and I'm making my first site that makes extensive use of ajax. I've used the xmlHttpRequest object on a few occasions, for which simply creating functions as I needed them were adequate. But the site I am … | |
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 … | |
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 … | |
This may be a simple fix, but I have a class for a program that contains some member functions that manipulate a vector. The vector is a private member variable, and is filled from an array using a constructor. When I try to access the member functions to manipulate the … | |
When writing a program that uses separate compilation (I have a header file, a .cpp file that declares all the member functions of the class in thee .h file, and an application file). I used a constructor to pass the contents of a dynamic array to a vector, but it … | |
Hi all, I'm almost done with a problem for a java class I'm taking. The chapter I'm studying is on inheritance and I think I understand it ok. The parent class will compile fine, but when the child class tries to compile I get an error saying it cannot find … | |
Okay, we had an assignment in computer class that I have been working on for awhile but what I've got so far isn't working. It seems that it may be a compiler issue, but since I can't get to a linux compiler (what the program will be evaluated on), and … | |
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. … | |
I have an assignment where I have been asked to ask the user for input. What I am trying to figure out is if there is anyway to call and use methods of another class whose constructor requires parameters without passing them from the main class that will be calling … | |
There is a working code about a program in which you should create differen Cat objects with name and color parameter and apply method to the objects. The problem is that I get the method working for only the last cat [CODE]public class Cats { public static String name; public … | |
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 … | |
Hi Folks, The page on which my userscript will run has a namespace, the namespace defines a constructor function. I would like to create an object using the same constructor and use methods of the object in my userscript. So far I have been unsuccessful. Here's what I am trying … | |
| 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 … |
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 = … | |
I have the following program : [CODE] #include<iostream> #include<string> #include<conio.h> using namespace std; template <class T> class matrice { T **a; int m,n; public: matrice(); matrice(int,int,int); matrice(char *); matrice(int,int,T **); matrice(matrice &x); ~matrice(){}; template <class U> friend ostream &operator <<(ostream &,matrice<U> &); int getNrLinii(){ return m; } int getNrColoane(){ return … | |
I need some help with inheritance in php. The code below does not produce any output. [CODE] Class Father{ var $car; Function inherited(){ print $this->car; } } Class Son Extends Father{ Function __Construct(){ $this->car='Benz';//I'm assuming here that car is still a property of father. } } $obj= new Father; $obj1= … | |
[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 … | |
I need help with an assignment for my programming course. I have three classes A,B,C. all stored in one array. (These are not my real classes there are just a guide) [CODE=c] Class A{ char name; public: virtual print(){ printf("%s",name); } } Class B : public A{ char middleName; public: … | |
I am having some trouble on inheritance in java. I am just testing how it works. I have a file that produces a random number in a folder called number. I have a file that calls the RandomNumber code that is in the main folder. I am wondering how I … | |
I have a situation like this... I have four different tables namely btech_ece, btech_cse, btech_it, btech_eee all these tables have the same columns. Its just that the name differs and everything else is same. Their columns are:- Id Year Semister Section Period SubjectCode Date Status now i have four different … | |
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 … | |
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? | |
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: … | |
I was just a bit confused about something sorry. If you have two classes, Ribbon1 and ThisAddIN below. How can I call Example()? - All are in the same namespace.. [CODE] public partial class Ribbon1 { private void button1_Click_1(object sender, RibbonControlEventArgs e) { //Call Example() from ThisAddIn Class Example(); } … | |
Ok it's all about to create 4 class Class a , class b derived from a and c derived from b and test class Speed is an instance variable in class b and c. The method are : Start() -a method of all class to print the message"hee" override the … | |
hi. i need help for a problem. i have an array of double values in the main method. i am trying to create an object and pass the array to a different class using an overloaded constructor. i am having trouble with the syntax. please help, i need to use … | |
Hi, I have a homework assignment that I just cannot figure out. I would be grateful of any help. The assignment is: Create a program which: Implements a class called Queue: The class should contain an array of maxQ integers. There should be two constructors: One that takes no argument … | |
Hi, I have a project to do for a C++ class that asks us to use a class termed "queue" to store some values (20/100/user defined) and allow the user to add/remove values. I'm sure it seems really basic, but I just can't get my code to display the class. … |
The End.