1,089 Topics

Member Avatar for
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
136
Member Avatar for AT--O

[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 …

Member Avatar for AT--O
0
128
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
390
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
138
Member Avatar for stereomatching

Is it really hard to find someone who know how to make a good use of stl and combined the power of GP and OOP?Like the way modern c++ design did? There are so many people say these kind of techniques are unrealistic because there are only a few of …

Member Avatar for vijayan121
0
259
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
43K
Member Avatar for techlawsam

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; …

Member Avatar for Mitja Bonca
0
179
Member Avatar for Hardosh Kumar

Please Help me to solve that i just wana to search Data feilds from SQL Database and to show on different TExtboxes of VB.net forms..... [CODE] Dim Bio As New DataSet Dim Marks As New DataSet Dim Disp As New SqlDataAdapter Dim Dispp As New SqlDataAdapter Dim Bind As New …

Member Avatar for Hardosh Kumar
0
262
Member Avatar for biggnlarge

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 …

0
124
Member Avatar for Aviras

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. …

Member Avatar for JamesCherrill
0
223
Member Avatar for digipak

Hello, I have a class Pdisk [CODE] class Pdisk { public : Pdisk(string diskname, int numberofblocks, int blocksize); private : string diskname; int numberofblocks; int blocksize; }; [/CODE] Now I want to make a class filesys which can access an object of class Pdisk. I am not sure how to …

Member Avatar for StuXYZ
0
507
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
208
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
184
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
210
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
234
Member Avatar for Macilath

Howdy, I have a few questions regarding the use of ctime within a class. I followed the example on [URL="http://www.cplusplus.com/reference/clibrary/ctime/strftime/"]http://www.cplusplus.com/reference/clibrary/ctime/strftime/[/URL] When the program is like this, it works: [CODE] #include <ctime> #include <iostream> using namespace std; int main(){ time_t current_seconds; current_seconds = time(NULL); //Fills current_seconds with the number of seconds …

Member Avatar for Macilath
0
690
Member Avatar for techlawsam

Getting some errors at least this time I know why..seems like I am not declaring the methods inside my classes I tried rearranging the method and then inserting all my code into a class but Im still getting all those errors in the bottom. If you guys can tell me …

Member Avatar for arunkumars
0
559
Member Avatar for rcmango

Hello, I've created something, its quite large, however I decided to write it without using oop, now I believe I see why I should just use oop. Okay, so the problem is with my bool values specifically: [CODE]button_pickup2 = false; button_pickup1 = true;[/CODE] For some reason when the ReflexAgent function …

Member Avatar for gerard4143
0
318
Member Avatar for ben1996123

I've managed to use classes in separate files before, but I can't seem to get it to work here. I was just programming some very basic classes for a simple game I wanted to make. Here is the main.cpp file: [code]#include <iostream> #include "energySystem.h" #include "healthSystem.h" #include "intelligenceSystem.h" using namespace …

Member Avatar for ben1996123
0
560
Member Avatar for sumi1234

the aim of this program is to create a record of 20 members inputted by the user st the phone number is stored in 3 different parts e.g. 011-234-7891 where 011 is area code 234 is exchange and 7891 is numbr...every record must have a member id and member name …

Member Avatar for sumi1234
0
271
Member Avatar for javaNooblet

Hi all, I am having trouble with class communication to reset some textfields through event handling. Any help would be appreciated. Here is a portion of my code. [B]The class that contains the textfields that I wish to use a reset button for:[/B] [CODE]import java.awt.*; import javax.swing.*; import javax.swing.border.*; public …

Member Avatar for mKorbel
0
216
Member Avatar for G_S

Hello. I recently started studying Java and OOP. I am currently creating a class that writes text to a file in a particular format. I have 'finished' it, and it works, but I am unsure as to the quality of the implementation. This is how it works: * First of …

Member Avatar for ~s.o.s~
0
212
Member Avatar for chiiqui

I am having an error with my constructor, why is that? :| [CODE]public class Name{ private String firstName; private String middleName; private String lastName; public Name(){ this( "null" , "null" , "null"); } public Name(String first){ this(first," "," "); } public Name(String middle){ this(" ",middle," "); } public Name(String fName …

Member Avatar for chiiqui
0
233
Member Avatar for MattJones

Hey Guys, I'm working on a C++ program for school. Basically the Program inputs a file of points and outputs an svg file that contains the Graph with the least number of edges. We need to implement this with the Kruskal and Prim algorithm, and the algorithm needs to be …

Member Avatar for Fbody
0
205
Member Avatar for mikesowerbutts

Hi, Im trying to convert my UserControls to be sharable across multiple projects. I have read up on this, and it seems that I need to have all code in one file (i.e. in the .ascx, rather than codebehind/designer) so I am trying to do this: [CODE] <%@ Control Language="C#" …

Member Avatar for kvprajapati
0
946
Member Avatar for davy_yg

I have the following codes: [CODE] <?php class LongName { var $firstname = " "; var $middlename = " "; var $lastname = " "; function firstname() { echo "First Name : ". $this -> firstname; } function middlename() { if (middlename){ echo "Middle Name : ". $this -> middlename; …

Member Avatar for cwarn23
0
154
Member Avatar for hopper24

#include <iostream> #include "Invoice.h" using namespace std; int main() { string description; double price; int quantity; cout << "Enter the description: "; getline(cin, description); cout << "Enter the unit price: "; cin >> price; cout << "Enter the quantity: "; cin >> quantity; cout << endl;//a new line //create an …

Member Avatar for hopper24
0
206
Member Avatar for agmolina90

Ok I am a programming student and need help with a problem, I already have most of it (so I don't need you guys to do my hw :P) but I am having problems with am, and I am not even sure if I am doing it right. [B]Problem:[/B] (The …

Member Avatar for Ezzaral
-1
10K
Member Avatar for Deepo

hey guys so I'm studying a unit called Object Oriented Analysis its not one of my strongest units so i need some help in the concept of understanding UML and i have a exam coming up and i was if you guys could help me understand the basic concepts here …

Member Avatar for fruitymo
0
156
Member Avatar for mullerfourie

Hi, I need to finish a assignment on operator overloading but this one piece of code doesnt seem to make sense.. in my int main() i have int main() { Element a, b(5), c(7), d; cout << (5+b) << endl; this is just part of it, I have already implemented …

Member Avatar for mullerfourie
0
215
Member Avatar for Rizi004

please help me i m having problem for making this program First Part: (Using Structures) Create a structure called Complex for performing arithmetic with complex numbers. Complex numbers have the form realPart + imaginaryPart * i where i = √(-1) Use floating point data to represent members of structure (i.e. …

Member Avatar for Narue
0
514
Member Avatar for wiredin

I need to make 45 objects of a nested class within my main class. I have tried instantiating the objects inside the main class' data fields and then inside of its default constructor. After being instantiated, i need to add 15 of the objects to 15 more arrays (each object …

Member Avatar for NormR1
0
172
Member Avatar for janice91

Dear experts, i need your kind assistance of the following question: Build a simple banking simulation around the BankAcct class. Require to write a program to act as the "Bank", which provides the following services: a. Create new account. A new account will be created, with a unique bank account …

Member Avatar for JamesCherrill
0
201
Member Avatar for warlord902

I am in situation like I have a class which have two different subclasses. [CODE]public class SuperClass{ String st; public String getSt(){ return st; } } class A extends SuperClass{ } class B extends SuperClass{ } [/CODE] Now I have another method that want to access the getSt inherited method …

Member Avatar for javaAddict
0
178
Member Avatar for stevenbaron1

Hi Guys, I noticed that in some apps people tend to use the following method in classes without instantiating an instance or defining objects, but this works, could someone explain whether this is a correct way of doing it. (its for a simple data management and interface app) For eg. …

Member Avatar for stevenbaron1
0
168
Member Avatar for JoshuaBurleson

In one of the books I'm using to study Python I keep seeing things like: [CODE] class Application(Frame): super(Application, self).__init__(master): self.grid() self.bttn_clicks=0 self.create_widget"""which is another function in the class"""[/CODE] Why is the super necessary for the class if the class it's calling is itself?

Member Avatar for JoshuaBurleson
0
263
Member Avatar for termin8tor

Hey all, I've been programming an ISBN system of sorts and I'm a little stuck (again). I want to output my linked list to a text file, so I setup the code like this: [code] void saveList(char fileName[40]) { for ( list< Publication* >::iterator it = pubList.begin(); it != pubList.end(); …

Member Avatar for termin8tor
0
275
Member Avatar for termin8tor

Hey all, I'm attempting to use an STL List to store a list of objects. Now I realise it's quite trivial to store a list of objects of my own definition. My real question is, how do I fill the list with objects that inherit from a base class. E.g. …

Member Avatar for termin8tor
0
275
Member Avatar for king03

What's wrong with my code? Why can't I output the "hahahaha" string from public constructor1?? help me please. [CODE]using System; namespace hahahahahahahahaha { class Program { public static void Main(string[] args) { constructor1 obj = new constructor1(); } } public class constructor1 { public constructor1(); { Console.WriteLine("hahahaha"); } } }[/CODE]

Member Avatar for Mitja Bonca
0
148
Member Avatar for janice91

Greetings to all experts, I am a newbie here in Java OOP and is struggling in practicing how to code a OO program, using Java. I hope anyone can give me a head start please. Here is the requirement which i am suppose to complete: [B]Input[/B] The first line of …

Member Avatar for JeffGrigg
0
2K
Member Avatar for janice91

Greetings to all experts, I am a newbie here in Java OOP and is struggling in practicing how to code a OO program, using Java. I hope anyone can give me a head start to enable me to write the main method to test the 2 methods. Here's the question: …

Member Avatar for JeffGrigg
0
198
Member Avatar for ben1996123

I just watched this tutorial: [url]http://www.youtube.com/watch?v=NTip15BHVZc[/url] and tried it myself, but I could not get it to work, I get these errors: [CODE]||=== 15. Placing classes in separate files, Debug ===| C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes in separate files\src\testClassFile.cpp|1|error: testClassFile.h: No such file or directory| C:\Program Files (x86)\CodeBlocks\programs\tutorials\15. Placing classes …

Member Avatar for ben1996123
0
1K
Member Avatar for Niles64

Hi OK, so I am reading on OOP in Python, and I am an old C/C++ programmer so I have somewhat high expectations :). My question is regarding private/public variables. Per default, all class data members are public, but if we precede them with a double underscore, they become private. …

Member Avatar for TrustyTony
0
208
Member Avatar for anuj_sharma

Hi Guys, I was going through a [URL="http://www.daniweb.com/software-development/java/threads/374765"]thread[/URL] in this forum and there is one very good reply to this thread. In the past Ive never used such techniques to idetntify how many classes would I create in my program, thus my programs used to be complex. Can you suggest …

Member Avatar for JamesCherrill
0
170
Member Avatar for aman rathi

The below code is showing error i checked lots of time didn't find any error please help me. [CODE] class emp{ int id,sal; String name; emp(int id,int sal,String name) { this.id=id; this.sal=sal; this.name=name; } void show() { System.out.println("Name: "+name); System.out.println("Salary: "+sal); System.out.println("ID: "+id); } } class manager extends emp{ int …

Member Avatar for aman rathi
0
195
Member Avatar for iThaos

Hi, I was wondering whether it is possible to use a parent class' properties without calling its constructor. In the following example: [CODE]<?php class Shop { public $location; public function __construct($location = ''){ if(!empty($location)){ $this->location = $location; } else { $this->location = 'a place far far away'; } $this->location .= …

Member Avatar for iThaos
0
214
Member Avatar for turista

I have this working code but my teacher wants really specific things. codes always have to be OOP, and this needs to to have no more then 2 cout. i have 3 but cant seem to find away to take one out. my friend told me i should do this …

Member Avatar for turista
0
270
Member Avatar for ktsangop

Hi everyone! I am trying for the first time to write "proper" object oriented c++ (ANSI) code. Up until now everything was made easy to me using visual studio and working with mfc or .net which both handle a lot of the "dirty" stuff... To the point : I want …

Member Avatar for ktsangop
0
962
Member Avatar for floatingDivs

Hey guys, I've spent the last 20 or so minutes developing an OOP cookie-setting script. Unfortunately, even though everything I'm printing out via alert looks correct, the cookie won't set. Can someone take a look and see where I've made a mistake? [CODE] <script type="text/javascript"> function Cookie(){ this.cookieName; this.cookieExpiration; this.cookiePath; …

0
64
Member Avatar for turista

Hi i saw a post about this program already. im new to c++ and im lost... completely lost... im not even sure im posting this in the right place. anyways. the program i got is working correctly until i make it an OOP which is what my teacher wants us …

Member Avatar for Chilton
0
259

The End.