39 Topics

Member Avatar for
Member Avatar for joshl_1995

Hello Daniweb Community, Lately we have been experiencing slow internet, now the thing is. In the house we have **12 devices** connected, then from the router it goes out to the bungalow which has around **5-7 devices**. The router we have in the house is a TP-Link Archer D50 and …

Member Avatar for joshl_1995
0
699
Member Avatar for johncrud

Hello world! I am requiring some assistance with my C# program, where I am getting an error message for having a form where the user would enter in text into a text box. I am trying to detect if the user has pressed the Enter key, and on doing so …

Member Avatar for vaynenick
0
2K
Member Avatar for Bendez Thyna

can someone explain me how this operator work? i just need some hit to clearify my confusion on this... thanks

Member Avatar for rubberman
0
168
Member Avatar for jonathan710

So I was asked to solve this question...however when i compile it, it doesn't work...could somebody tell me what's wrong and how to solve it (im guessing it's something to do with overloading since my lecturer was talking abt it just before this was given)? thanks a lot! #include <iostream> …

Member Avatar for DeanMSands3
0
264
Member Avatar for linezero

I'm currently working on a project on VB.NET and I'm getting this error below. > Error 2 Overload resolution failed because no accessible 'New' is most specific for these arguments: 'Public Sub New(name As String, dataSourceValue As System.Collections.IEnumerable)': Not most specific. 'Public Sub New(name As String, dataSourceValue As System.Data.DataTable)': Not …

Member Avatar for tinstaafl
0
254
Member Avatar for tayyabatiq

I'm making a class for boolean expressions, a simpler version of bool. I need three operators, one for AND, one for OR and one for NOT. I can easily make **+** for OR, by overloading, but how can i declare **.** for AND and **'** for NOT? Can i even …

Member Avatar for Nutster
0
260
Member Avatar for tristanhall

I'm trying to make a program for my computer science class and it requires that I run output to the console as well as to a file. I'm looking for a way to intialize a string at the beginning of the program and pass the variable by reference to my …

Member Avatar for tristanhall
0
301
Member Avatar for Dendei

using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { Cassandra myObject = new Cassandra(); string a ="söt"; myObject.hejsan(a); System.Console.WriteLine(a); Console.ReadLine(); } } class Cassandra { public string hejsan(string value) { value +="Cassnadra"; return value; } } } how come this wont work? all i get is …

Member Avatar for Dendei
0
169
Member Avatar for 111100/11000

#include <iostream> #include <cmath> #include <string> #include <cstdlib> #include <cstring> using namespace std; char Outputing(char shifted_letter); int found_match; int searching_alphabet; int main() { const char ORIGINAL_alphabet[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; //maybe const isn't necesery char alphabet[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; cout << "This program encrypts messages using Ceaser Cipher\n"; cout << "\n---------------------------------------------------------"; cout << "\n---------------------------------------------------------"; cout << "\nEnter …

Member Avatar for Labdabeta
0
326
Member Avatar for eggsandbacon

Hey everyone, I'm working on an assignment and I'm having some trouble figuring out how to implement two operators. The program creates and implements a class to represent the Stack ADT using a singly-linked list. There is a driver program to test my implementation. I have everything implemented (except the …

Member Avatar for aranayd
1
1K
Member Avatar for brunoccs

Give then following Class declaration: class Employee { public string Name { get; set; } public int Age { get; set; } public override bool Equals(object obj) { Console.WriteLine("In Equals(Object)"); if (obj is Employee) if (this.Name == (obj as Employee).Name && this.Age == (obj as Employee).Age) return true; else return …

Member Avatar for Momerath
0
170
Member Avatar for lanyusea

I wrote two functions like that int absolute(int a) { return (a < 0) ? -a:a;} int absolute(int &a) { return (a = (a < 0) ? -a:a;} The two function have the same name and the same type, When I do like that: int main() { int a = …

Member Avatar for PrimePackster
0
169
Member Avatar for sciwizeh

Hello, thought I'd ask before getting too deep into code to make sure I understand this properly. As described in the Gamma et. al. book the Visitor Pattern looks something like this: interface Visitor{ public void visitX(X x); public void visitY(Y y); public void visitZ(Z z); } interface Visited { …

Member Avatar for JamesCherrill
0
1K
Member Avatar for stormik

Hi there, I need to overload istream in this way: it needs to get string, then it has to parse this string and get number - can be longer than long long, and then save this number in another string, which I will give to class method. So far so …

Member Avatar for stormik
0
322
Member Avatar for jnewman3

So I have a matrix class that must run on a unix/linux server. The main is a test file that is provided by the instructor. When I compile my code in visual studio it works fine except for test 8 because I can't figure out how to return a print …

Member Avatar for jnewman3
0
1K
Member Avatar for pushpat

Hi folks, I am learning operator overloading concept in c++, wrote sample program to test overloading of unary operator '!' and '-'. Code will work if i use them as friend function but not for member function. Can anybody tell where am i going wrong in function bool operator!(const co_ordi …

Member Avatar for pushpat
0
325
Member Avatar for nerdygirl118

I am inserting all of the words in the dictionary into the unordered_set STL. For the life of me, I cannot figure out how to override the default hash function for the unordered_set. Can someone please point me in the right direction? I cannot figure out the syntax. Thank you …

Member Avatar for vijayan121
0
200
Member Avatar for Idestruction

I am doing this assignment for my C++ class, and we have to instantiate 4 objects of the Student class, set the data members and then sort them according to the GPA variable. Ive whittled down the errors to just one, and I am stumped. Here is the error: error …

Member Avatar for Idestruction
0
336
Member Avatar for ThuggyWuggy

I attempted to overload the == operator for one of my classes, I even copied a previous implementation of it, but now that I am using pointers it refuses to function properly here is the relevant code (there is a lot so I will provide more if need be) [CODE]#ifndef …

Member Avatar for ThuggyWuggy
0
6K
Member Avatar for michelleradu

Error C2662: 'Event::GetTime' : cannot convert 'this' pointer from 'const Event' to 'Event &'. This is my code: [CODE] #include <iostream> #include <queue> #ifndef Person_h #define Person_h #include "Person.h" #endif using namespace std; enum EventName { _SendMessageToUserInterface, _SetPNOld, _IntroduceInfection }; class Event{ int time; EventName name; Person person; public: Event(int …

Member Avatar for michelleradu
0
356
Member Avatar for iamuser_2007

hi in my text book i have this problem. how to program this [ICODE] Define a class Quadratic_int that stores the coefficients of a quadratic polynomial in a dynamically allocated array of integers. Supply the "big three" memory management functions. Use this class to demonstrate (a) the difference between initialization …

Member Avatar for sergent
-2
189
Member Avatar for daianahoney

Hello forum. I cant figure out how to overload the '+' operator or maybe theres another error? Im posting from phone so excuse the slopyness. Thanks! [CODE]#include <iostream> #include <string.h> #include <ctype.h> using namespace std; class Ferma { public: static int nr_rate; static int nr_gaini; static int nr_porci; static int …

Member Avatar for daianahoney
0
234
Member Avatar for BobTheLob

Hey, so i've looked around online for a bit, and after finding similar, but not exact (as in it doesn't help me), i'm gonna post my problem here :P. I'm working on a class to handle Complex numbers. This is going to require a lot of operator overloads and the …

Member Avatar for BobTheLob
0
253
Member Avatar for lasl0w

Hey all, I'm writing a program that is an address book using an AVL Node structure (which was provided). I defined the [I]contact[/I] class as the ItemType of the data to be inserted in each node. Initially I encountered a Segmentation fault that occured during the assignment from the AVLClass …

Member Avatar for lasl0w
0
972
Member Avatar for aviavyne

Hello, I have a problem which goes like this. I need to be able to design a simple class, which i have done, and it must represent any numeric value, which includes a decimal and negative value. So i need to overload the operators, because the '%' will make an …

Member Avatar for Clinton Portis
0
252
Member Avatar for keweul

[CODE] #ifndef POLYNOMIAL_H #define POLYNOMIAL_H class Polynomial { public: Polynomial(); Polynomial(int ,int []); ~Polynomial(); const Polynomial operator+(Polynomial& p) const;// addition const Polynomial operator- (Polynomial& p ) const; // subtraction int getExponent(); //void setExponent(); void setCoefficient(); int getCoefficient(); void printPolynomial(); private: int exponent; // exponent int coefficient[ 10 ]; // coefficients …

Member Avatar for cppgangster
0
4K
Member Avatar for crodriguez08

Hey, I keep getting this error, but from its description, I can't really tell how to fix it besides from what I've already tried, so any explanation would be great. The error I get is: clientrectlib.cpp(32) : error C2664: 'calcMinMaxValue' :cannot convert parameter 1 from 'overloaded-function' to 'float &'. The …

Member Avatar for StuXYZ
0
189
Member Avatar for sinfultom

Hi there, I'm new to the forum so please be kind :) I've created a class called node that has a standard constructor and an overload that uses an int as an argument. [code=c]class node { public: node(void); node(int inputs); ... };[/code] I can create an dynamic array of nodes …

Member Avatar for Duki
0
182
Member Avatar for mike_2000_17

Hi experts! I have the following code which I use for dynamically creating objects in one module (executable or shared object (.so or .dll)) and be able to delete it from any other module while enforcing the call to the delete operator in the original module where the object was …

1
148
Member Avatar for Mozza314

I'm a little new to C++ templating, and I'm having trouble understanding this behaviour. Basically, I have a templated class, and I want to define the = operator between the class and the same class with any template parameter. The problem is that the overloaded version of the = operator …

Member Avatar for mike_2000_17
0
248

The End.