49,757 Topics

Member Avatar for
Member Avatar for NinjaLink

I am trying to determine if a word is a palindrome or not using queues, but I am receiving the wrong results. I have tried several things to get it to work using the boolean variable isPalin. Will someone lead me to the right direction please? I have been trying …

Member Avatar for JasonHippy
0
118
Member Avatar for ellimist14

I know it's a lot of code but any help anyone can give would be amazing. Basically when I re-write out to the binary file it must not be working because when I try to print it it only prints the record I updated. [code] void updateRecord() { int key; …

Member Avatar for rdrast
0
160
Member Avatar for svgreatest

When i run the program using g++ 4.3, i am getting a segmentation fault. After, checking with gdb, i am getting the segmentation fault on line 79. The program is k-way merging. Any help is welcome. Thanks. The code is: [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; …

Member Avatar for Dave Sinkula
0
97
Member Avatar for .:Pudge:.

I don't know how to properly override this function when it comes to an Iterator for a linked list. [CODE] ListIterator operator++(){ currentPtr->prev=currentPtr; currentPtr=currentPtr->next; currentPtr->next=currentPtr->next->next; return *this; } // advance iterator to the next list node; return value is iterator *after* advancing ListIterator operator--(){ currentPtr->next=currentPtr; currentPtr=currentPtr->prev; currentPtr->prev=currentPtr->prev->prev; return *this; } …

0
53
Member Avatar for RaveFantasy

Hello there~ Well, straight for the problem: I have a class with a private vector that stores pointers: [code]class MyClass{ private: vector<myOtherCls*> myVector; public: //using the following till now: vector<myOtherCls*>& getContainer(); };[/code] [code]class myOtherCls{ public: void someGetFunc(); };[/code] Now I dont want to use [icode]getContainer()[/icode] but rather he Subscript-Operator. [code]MyClass …

Member Avatar for RaveFantasy
0
108
Member Avatar for C++ Beginner

Problem: Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: `void getScore()` should ask the user for a test score, store it in a reference parameter variable, and validate it. This …

Member Avatar for C++ Beginner
0
2K
Member Avatar for skp888

hello, my problem is: i have a function that i pass a pointer to so that it can update a variable for me. when this function is called normally the variable updates and everything works fine. BUT when i call this function *as a seperate thread*, and pass it the …

Member Avatar for skp888
0
255
Member Avatar for newcpp

I have a problem when handling the txt file in C++. My code is like this, and the test.txt file is in the attachment. there are two functions: [LIST=1] [*]int txtnum(ifstream& input, char* filename ) is to count the amount of numbers list in the txt file. [*]long filesize( ifstream& …

Member Avatar for Ancient Dragon
0
139
Member Avatar for Wong23

Can someone help me with this problem... A is an m*n matrix B is an n*p matrix product AB is an m*p then I have to write a function void matrix product that takes two matrices of integers as two separate arguments and then calculates the product of those matrices …

Member Avatar for tintin.iitk
0
110
Member Avatar for sa3q

hello all, my problem that i can't get the language id that has been active in this time using c++ please can any one help me in that thank you

Member Avatar for sa3q
0
46
Member Avatar for Ashishinani1756

help me in listing file names inside directory by using a simple code in c++ that a beginner can understand

Member Avatar for skp888
0
137
Member Avatar for Wong23

can someone help me with this problem(factorial) everything is working fine but when I enter a negative number the program crashes somewhere....but n can be any non-negative number Here is da code #include <iostream> #include <string> using namespace std; int fact(int n){ if (n==0) return 1; else return fact(n-1)*n; } …

Member Avatar for dkalita
0
99
Member Avatar for tkud

Hey,everyone.. pls I need a very exhaustive example of a typical linked list for better understanding .Any help will be appreciated..Thanks

Member Avatar for tkud
0
103
Member Avatar for fraandres

why when I run it ....the output of the "if" statements doesn't come up ...Im trying to see if theres any erros but I just cant find anything please any help I would appreciated [CODE] include <iostream> #include<iomanip> using namespace std; int main() { char size; cout<<"******************Welcome to M&D Pizza …

Member Avatar for alg
0
101
Member Avatar for cproud21

I have the following code that tests a string to see if it is a palindrome. The only error I am getting is when I try to pass each character to the queue and stack. Is there another way to pass it to each? [CODE]//Implement the palindrome-recognition algotithm described in …

Member Avatar for BeyondTheEye
0
116
Member Avatar for jtddogg

I have been looking for something to make it click in my head on how to get the average of my array and I need help. [CODE]#include <iostream> #include <math.h> using namespace std; int grades[10],a,total; double average; void main(){ cout << "Enter 10 test grades to average:" <<endl <<endl; for …

Member Avatar for mrnutty
0
119
Member Avatar for akosmaroy

while syntactically templates cannot be virtual functions, I wonder what approach to use when semantically this is what someone wants to do. for example, in my case I want to have a virtual function, because I'm using sub-classes while having a pointer to the base class, but I also want …

0
82
Member Avatar for arifliminto86

Hi, I got problem with Interprocess communication in MFC I am using vs2003 I have got project using named pipes. It seems to be perfect, However, When client want to create the file it always fails the pseudo code Server - Create Named Pipe - Read File Client - Create …

Member Avatar for jangid
0
199
Member Avatar for khanalone1

Hello Everybody, IS there anyone in this forum who have worked on Elliptic curve cryptosystem/cryptograpgy? I want to discuss something regarding ECDSA, i have perfectly implemented ECDH and have a problem in implementing ECDSA. Regards!

Member Avatar for khanalone1
0
210
Member Avatar for basketball4567

Hey guys, Im still new to programming and need help with something. I need to read a line of numbers from a text file into an array. I will be given this in a text file and need to store them in an array for later use. 0 1 2 …

Member Avatar for amishraa
0
80
Member Avatar for amishraa

Can someone please copy/paste the following source and look at the error message? I am receiving too few arguements to function error. Please help! //preprocessor directive #include<iostream> #include<fstream> #include<iomanip> using namespace std; //global variables/constants, function prototypes void headerfn(); // void fn without parameters void namefn(string fname, string lname); // void …

Member Avatar for amishraa
0
135
Member Avatar for openoutcome

Hey there! Hope you guys can help me out.. Here is my assignment: 1 2 3 2 3 1 3 1 2 Program Requirements: The program will prompt the user for the order of Latin Square that the user desires (again, the above is order 3, which means 3x3; an …

Member Avatar for jonsca
0
954
Member Avatar for college.guy

Hey all, first off, I'm NOT looking for answers to my homework by any means. I am rather looking for guidance. I want to understand the material rather than just have the solution handed to me. Therefore, here's my problem: I have a project where I have to read info …

Member Avatar for mrnutty
0
103
Member Avatar for NinjaLink

I recently have a thread open, but I feel it is starting to get too long, and the topic is kind of old since I have a new problem now. What I am trying to accomplish here is determining whether a word is a palindrome using queues. My program compiles …

Member Avatar for NinjaLink
0
196
Member Avatar for Ashishinani1756

i ve two directories and i ve to write a c++ code for getting files names of both the directories printed side by side .(Assume equal no.of files in both directories)

Member Avatar for Ashishinani1756
1
107
Member Avatar for dylank

Hi, I am creating a crackme (or possibly keygenme, if i feel like it) that realys on a IsDebuggerPresent call to see if the user has olly or another debugger open analyzing it. My current code reads as follows: [CODE]#include <windows.h> #include <stdio.h> #include <iostream> #include <ctime> using namespace std; …

0
108
Member Avatar for Jehutiy

Hello everyone, I am having some trouble trying to get my circularly linked list to work. It does compile but it gives a Segmentation fault. This is my first time learning something like this and I don't really know whats wrong. If anyone could possibly point out some problems it …

Member Avatar for MooAndStuff
0
127
Member Avatar for .:Pudge:.

*EDIT* IT IS A SEGMENTATION FAULT NOT BUS ERROR (anyway to change thread title?) I am trying to make a deep copy of a linked list, but whenever I run a test of the constructor i get a "Segmentation Fault". I tested the "Append" method and it works fine. I …

Member Avatar for power_computer
0
102
Member Avatar for power_computer

Ok, I am trying to figure out how to purse this current project which deals with dynamic allocation and linked list Here is the information I am given the following two structs [code] struct employee { int ssn; string name; float hours; assignment * list; }; struct assignment { string …

Member Avatar for power_computer
0
212
Member Avatar for NinjaLink

Hello I am trying to determine whether a word is a palindrome or not using queues in my program below. However, I am currently having a problem. When I compile and execute my program, the output screen comes up and disappears very fast. Afterwards, I ran the program using the …

Member Avatar for jonsca
0
106

The End.