20 Solved Topics

Remove Filter
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 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
302
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 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 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 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
254
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 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
183
Member Avatar for embooglement

I'm trying to write a to string function that would use std::stringstream to convert the the instance data into a string, but haven't been able to get operator overloading to work with it. As soon as I define a new << operator, I get a bunch of ambiguity errors saying …

Member Avatar for embooglement
0
2K
Member Avatar for sbrohee

Hi everyone, I am quite new to C++ (coming from perl). As an exercise, I am currently trying to create a class to play with graphs. I have a class Node in which I overload the == operator (to test the equality between two nodes). At the moment, I consider …

Member Avatar for sbrohee
0
265
Member Avatar for Alex_

I'm trying to make the container to work with one of my classes. But i don't understand what should the overloaded operator contain. Maybe this is because i don't know the container too well... Please give me some insights. This is my class [code=C++] class Complex{ private: int re; int …

Member Avatar for mitrmkar
0
158
Member Avatar for RayRay1

I am writing a rational number class and need to know if this is the correct way to do it. Can someone please let me know if I'm on track or not? Thanks. [CODE]class RationalNumber { public: RationalNumber( int = 0, int = 1); // constructor RationalNumber operator+( const RationalNumber& …

Member Avatar for RayRay1
0
831
Member Avatar for ryan8806

hi guys, i'm having a bit of a prolem with C++, i've been programming c# for quite a while now, so i am not a novice lol. problem -- i've created the following ofstream in my main method: [CODE]ofstream out1("array1.txt");[/CODE] however later on in the code i call [CODE]out1 << …

Member Avatar for ryan8806
0
2K
Member Avatar for maddav

Hi, Recently (today) got an assignment to take a particular code that we've done previously, and split it into 3 files: 2 .cpp files and a header file. Now, i believe i've done it correctly, but the only thing that's throwing up errors is the use of friend for overloading …

Member Avatar for maddav
0
3K

The End.