Hi I have two classes, one called Instruction, one called LDI which inherits from instruction class.
class Instruction{
protected:
string name;
int value;
public:
Instruction(string _name, int _value){ //constructor
name = _name;
value = _value;
}
~Instruction(){}
Instruction (const Instruction &r...
I have a list of type Instruction*. Instruction is a class that I made. This class has a function called execute().
I create a list of Instruction*
list<Instruction*> instList;
I create an Instruction*
Instruction* instPtr;
instPtr = new Instruction("test",10);
If I call
instPtr.execute();
the function will be executed correct...
I had a quiz at school and there was this question that I wasn't sure if I answered correctly. I could not find the answer in the book so I just wanted to ask you.
Point* array[10];
How many instances of class Point are created when the above code is called?
I answered none because it only creates space for 10 instances, but doesn't ...
Hi,
I've got a set of classes I'm trying to test. Class A depends on Class X. Class X contains functions which do random things and things with databases. I've created a mock version of Class X which returns exactly what I want it to in order to test Class A without dependencies.
So, my question is, how do I now test Class X as I've a...
ASP.NET 2.0 internal (intranet) web app using Integrated Auth + Impersonation. Developed on dev server (where classes reside) and published to production intranet server. Please bear with me, I'm not a .NET developer! Due to Exchange server move & upgrade an old app with mail features broke. I found the SMTP code in a class file on the d...
I'm quite new to Visual Basic - using Visual Studio 2008 and can't seem to find a way to do the following:
I have a few tables in a SQL Server database and have used LINQ to SQL to create classes of those tables.
Here's a cut down example of what I'd like:
listbox1 filled with table names - APS, SMPS, WCPC, CFLAPS
Then from the Select...
What is the most efficient class to use to read from and write to console in Java?
...
I have a line of code like this:
var myObj:[SomeClass] = new [SomeClass]();
I want to choose which class this object will belong to randomly at runtime. Is there a way to do this in Actionscript 3?
...
how to add Namespace in class diagram. Means if i want the scenario like
NamespaceOut.NameSpoaceIn.Class1
NamespaceOut.NameSpoaceIn.Class2
NamespaceOut.NameSpoaceIn.Class3
......
so how to design class diagram for this ? I want to use nested namespaces. Is i need to manually do this?
If yes so isn't it ,is the bug ? right?
...
I am (slowly) writing an XML parser for some "site definition" files that will drive a website. Many of the elements will be parsed in the same manner and I won't necessarily need to keep the values for each.
The XML
The parser so far
My question is actually pretty simple: How can I use jquery manipulators in an class function? How ca...
Which php library makes it easy to embed images into an email.
...
Hello,
I am using some method to autoload helper files with functions
The only problem I am having now, is how to call the variables in that class.
Because I am not instantiating it as an object $this won't work.
But what will??
class some_helperclass {
var $some_variable = '007';
public static function some_func()
{
//ret...
Why is this legal in PHP?
<?php
class Foo {
public function test() {
echo "hello\n";
}
}
Foo::test();
?>
test() is a non-static function but I can access it without an instance.
...
How do you get the name of a generic class using reflection
eg
public class SomeGenericClass<T>
{
}
SomeGenericClass<int> test = new SomeGenericClass<int>();
test.GetType().Name returns "SomeGenericClass'1"
How do I get it to return "SomeGenericClass" without the '1?
...
<namespace:BLOCKQUOTE id="" runat="server">
This is what I see in asp code,is there such a feature in PHP?
...
I attempted to do this Blueprint CSS tutorial, but couldn't get any elements to display in the last column. I found this solution, indicating there may be a problem with the last class, but it didn't work for me.
Has any one else experienced this issue and found a fix?
Please let me know if screenshots are needed to clarify.
<div cl...
Probably a stupid question, but I'm quite new to the whole "get-and-set-property"-kind of programming;
I keep getting a compiling-error on this part of my code;
private string _File = "Session.xml";
private XmlDocument XmlDoc
{
get
{
XmlDocument _Doc = new XmlDocument();
return _Doc.LoadXml(_File);
}
}
pri...
Hey,
probably the answer is quite silly but I need a pair fresh of eyes to spot the problem, if you will. this is the excerpt from _tmain:
Agent theAgent(void);
int m = theAgent.loadSAG();
and this is agent.h, which I included in _tmain:
#ifndef AGENT_H
#define AGENT_H
class Agent {
public:
Agent(void);
int loadSAG(void);
~Agent(voi...
Hello!
Very new to UML and system design.
We're at the stage of doing a class diagram in the design phase and are struggling to figure out how to implement a requirement. Here's the problem:
We have a Person class that is composed of a Name class and a ContactDetails class. Contact details class is composed of a MobileNumber and an E...
Hey this question is in reply to Joel Hooks's comment on an older question of mine (How to call a function in a Class from another Class?)
I was able to fix my own problem using a public static var to reference one of my Classes, so in the other class I just needed to use the this keyword so it could be called.
instance = this; // in N...