49,761 Topics

Member Avatar for
Member Avatar for minigweek

Hello there, I am currently trying to solve Towers of Hanoi for N pegs using C++. I am implementing the towers in the form of a link list. Suppose there be three towers , TowerA,TowerB,TowerC Then for TowerA: 3 2 1 TowerB: - TowerC:- shall become TowerA: TowerB: 3 2 …

Member Avatar for sidatra79
0
637
Member Avatar for mrboolf

Hi all. I am trying to write a template class queue for an "assignment" and I got stuck by what I think is a syntax error. To be honest, the assignment was MUCH easier than that but after having it completed I thought to be interesting to explore new possibilities... …

Member Avatar for mrboolf
-1
149
Member Avatar for gparadox

These are the directions: Recursive Descent Parsing Consider the following BNF grammar: E -> T + E | T - E | T T -> P * T | P / T | P P -> I | (E) I -> a | b | ... | y | z …

Member Avatar for gparadox
0
116
Member Avatar for mmjack

With this piece of code when i call read i get the output [ICODE]Start of loop Archived filename = ./Data/Test.log End of loop Start of loop Archived File = DATA MANAGER End of loop[/ICODE] Edit: It is exactly what i want except it adds there odd characters at the end …

Member Avatar for Ancient Dragon
1
103
Member Avatar for volscolts16

I had completed my code for my project, then decided to change it. I now have an error that I do not understand. C4715 which according to MSDN.com is 'function' : not all control paths return a value. The specified function can potentially not return a value. I have included …

Member Avatar for stilllearning
0
337
Member Avatar for HaibrarAi_sY

I am trying to open a file in loop and print the data which my teacher request. however, there is blank in the out put file. and , how to indent the body of loop?? there is my code, please someone tell me what i did wrong!! thanks~` there is …

Member Avatar for HaibrarAi_sY
0
89
Member Avatar for robgeek

Hi everyone, I was writing a program and out of the 4 functions, one void function is giving 4 errors that I am not able to understand. The function is : void Conversion(double, double, char). I am posting my program, including the function that is giving the errors. I have …

Member Avatar for Sci@phy
0
193
Member Avatar for meddlepal

Visual Studio 2005 is giving me heartburn while working with templates. Does anybody know what is going on with the following code, and the errors below? It says there is a syntax error, but I cannot find it. [CODE=C++] #ifndef DEQUEUE_H #define DEQUEUE_H #include <iostream> #include <list> template<class Item> class …

Member Avatar for meddlepal
0
168
Member Avatar for chunalt787

I am trying to implement a queue based on a Linked List that I had to write previously. It is templated and for some reason I am getting the following error using g++ when I compile: [CODE]g++ LinkedQueueMain.cpp -o LinkedQueueMain /tmp/ccqwStpK.o: In function `main': LinkedQueueMain.cpp:(.text+0x2ee): undefined reference to `LinkedQueue<char>::operator=(LinkedQueue<char> const&)' …

Member Avatar for chunalt787
0
263
Member Avatar for Cluelessluke

I am trying to implement the GSL uniform random number generator into my C++ program. Below is my entire program and I am having difficulties getting it to run properly. Any help would be greatly appreciated. Thanks for your time! [code=cplusplus] #include <stdio.h> #include <iostream> #include <math.h> #include <cstdlib> #include …

Member Avatar for dmanw100
0
211
Member Avatar for guy40az

Can you use a static library on visual studio 2008 that was complied on visual c++ version 6 or do I have to recompile the static library?

Member Avatar for Narue
0
41
Member Avatar for Liszt

im quite new to code and are using c++ to read files. Through some examples i have managed to read a file from top to bottom like this. The problem is that i will need to read the file from bottom to top instead. Is there a reversable method for …

Member Avatar for Liszt
0
160
Member Avatar for VBNick

Oooookay...this is really strange. I'm working on a program in MSVC++ 9.0 and it works fine when I hit "play" in the development environment, but when I manually navigate to the debug folder and click on the program, windows vista pops up an error saying that my "program has stopped …

Member Avatar for VBNick
0
225
Member Avatar for mrrko

I did all the coding, and I think that it is correct, but I dont understand why the program does not output the prime numbers!!! [code=cpp] #include<iostream> using namespace std; int main() { double newn; char ans; do { cout << "This is a program that will help you find …

Member Avatar for VernonDozier
0
152
Member Avatar for VernonDozier

[QUOTE=schamb;711245]also am curious as to how decimal to hexidecimal would work too just wanting to learn more about programming language and am very in experewienced[/QUOTE] You are going to have to get a lot more specific on these questions. General advice: 1. Read in a number in decimal. 2. Do …

Member Avatar for VernonDozier
0
108
Member Avatar for blinkliveson

Hey guys, I know you wont give me a direct answer, but that's not what I'm looking for. Here is the assignment: "Procedure: 1. Have the user input an integer between 2 and 19 (inclusive). If the number inputted is not within that range, reprompt the user again until a …

Member Avatar for Sci@phy
0
177
Member Avatar for rysin

I have the following code (as you will see im using the same template as earlier...:$ [CODE] #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main(int nNumberofArgs, char* pszArgs[]) { int z = 1; int x = 2; int y = 3; bool b; b = (x < …

Member Avatar for Sci@phy
0
95
Member Avatar for kjsalk

1,hi i need to create a program that will repeat the following 14 times.it needs to provide keyboard input that takes in hours worked in a day.after the 14 time it needs to show the hours worked. 2,the rate of pay is 6 pounds 50 pence. it needs to provide …

Member Avatar for Sci@phy
0
120
Member Avatar for champ80

please tell me algorithm or code for following character sorting (Ascending) problem. For example Text file contains following data: 001, PSTR, abcdef, h.no.222 abcdefghik lmnopq rstuv, student, A-level 002, MKTO, abcdef, house. 2 abcdefghik lmnopq rstuv, student, rtv 003, LORR, abcdef, h.number.210 abcdefghik lmnopq rstuv, student, O-level 005, ASMP, abcdef, …

Member Avatar for emotionalone
0
585
Member Avatar for DemonGal711

I thought I had this program licked and moved on to fixing the next problems, then ran it again and found out my while loop isn't doing anything. It goes into my loop, stops, and doesn't do anything else. If there was one item, it should move on to the …

Member Avatar for DemonGal711
0
49
Member Avatar for schamb

i am writing a binary to decmal conversion program in c++ and am so lost just wondering if anyone out there could lend a hand to a lost soul also am curious as to how decimal to hexidecimal would work too just wanting to learn more about programming language and …

Member Avatar for minigweek
0
132
Member Avatar for ae012

i have a machine problem to do. it should compute for the average grade of N scholars. N will be entered on the keyboard and the Student No. and Grades of the Scholars in *8 Subjects will be entered. sample output of program should be like this. STUDENT NO. S1 …

Member Avatar for emotionalone
0
239
Member Avatar for Kainan54
Member Avatar for Ancient Dragon
0
155
Member Avatar for mrrko

Hi guys. I will explain the problem I have in my own words. I have to make a program using the Fibonacci numbers, in which the user inputs a number of days and the original size a green crud population, and every 5 days the population changes by fibonacci numbers. …

Member Avatar for mrrko
0
382
Member Avatar for JackDurden

Say you have a class called example: [CODE]class example { int one; int two; };[/CODE] and you use this to get numbers from the user: [CODE]example number; cout<<"enter numbers"<<endl; cin>>number.one>>number.two;[/CODE] and then you call one function to manipulate the numbers and another to do some more manipulation. How do you …

Member Avatar for Ancient Dragon
0
101
Member Avatar for emotionalone

Hello, I'm trying to simply copy the text from one .txt and create a new one and copying it to a new txt. I'm actually adding more text to that new file but that's not the part I'm having problems with. I could go through the entire .txt with this …

Member Avatar for Ancient Dragon
0
508
Member Avatar for padawan

Hi everyone, I have a problem with debugging a dll file. I'm trying to convert the epanet2.dll (EPANET: a free source-coded water resource program) into a 64-bit dll file for my project. When compiling, errors coding LNK2001 and LNK2019 occurred many times. error LNK2001: unresolved external symbol ... error LNK2001: …

Member Avatar for Dave Sinkula
0
300
Member Avatar for scottlpool2003

Hi guys... I'm a student having a bit of trouble with my assignment. The assignment is to make a program for a phone company to calculate call durations, costs, discounts etc... I need the user to input call start time in 24 hour style... and end time. In order to …

Member Avatar for emotionalone
0
119
Member Avatar for Se7Olutionyg

[code=cplusplus] // file celsius to F // calculate from c to f in the depth st #include <iostream> using namespace std; float celsiusAtDepth (float); float CtoF (float); int main () { float depth; float tempF, tempC; // get depth cout<< " Enter depth in Km " ; cin>> depth; //calculate …

Member Avatar for skatamatic
0
86
Member Avatar for xb211

Hi All, I'm currently working on my project (which try to perform degree reduction for a Bezier curve). I've spent a long time trying to find library or useful class to help me perform matrix inversion. For example degree reduction in Bezier's curve (let's say from degree 3 to degree …

Member Avatar for xb211
0
137

The End.