49,757 Topics

Member Avatar for
Member Avatar for Alec0905

Hey guys, i'm working on a recursive problem that invlolves getting from a place "s" (start) to a part "e" (end) in as few moves as possible. There are road blocks "x" and the grid is a size up to 15x15. My problem is that when I try to write …

Member Avatar for Alec0905
0
162
Member Avatar for geryin

Write a function that accepts an array of integers and determines the difference between the integers. For example, if the array [3 7 8 13 11] is passed to the function, it prints to the screen [3 4 1 5 -2]. mine give me : 3, 4 ,4 9, 2 …

Member Avatar for Duoas
0
2K
Member Avatar for thisischris

So I have a data file that looks like this [CODE] Movie1 Year Salary Actor1, Actor2 Movie2 Year Salary Actor3, Actor4, Actor5 ... etc [/CODE] The part that's throwing me off is the actors line. It can have from 1 to 5 actors on it, separated by commas. I have …

Member Avatar for Duoas
0
131
Member Avatar for Purrenhage

I am learning C++. This class project was to write a program that will let you enter a diver's first and last name and city. Also 5 judges results along with the difficulty for the course. Then display the results. It is suppose to ask if you want to enter …

0
74
Member Avatar for xyzt

hello, i need a tool to measure the cyclomatic complexity of a given C source file. what do you suggest for this? thanks..

Member Avatar for IssamLahlali
0
153
Member Avatar for aaronmk2

I am having trouble with my quicksort. When I run my program it sorts them once( the lower half of the numbers are on one side, the higher half on the other). How can I get it to sort again without using a recursive function. [CODE] void qs::quicksort(int set[], int …

0
65
Member Avatar for gizmo7008

I'm trying to create a print void function, however I'm not understanding how to call the database in the print function. I've tried to do something similar to what is in my textbook but all I'm getting is errors. This is what I've done so far. [CODE] #include <iomanip> #include …

Member Avatar for gizmo7008
0
6K
Member Avatar for cppgangster

Hi, Thank you for helping and here is the problem: [ICODE] #include <string> #include <fstream> #include <vector> #include <iostream> using std::string; using std::ifstream; template<class t> class Openfile { private: string pavadinimas; ifstream fin; public: typedef ifstream & reference; Openfile(); Openfile(const char * c); reference rout(); std::vector<t> & operator>>(std::vector<t> &); ~Openfile(); …

Member Avatar for StuXYZ
0
230
Member Avatar for qvyhnl

Write the function my_strncat(). The function has three parameters: a char * s1, a const char * s2, and an int max, which represents the maximum size of the s1 buffer. Append the characters in s2 to the end of s1. Make sure you have only one '\0' at the …

Member Avatar for qvyhnl
0
98
Member Avatar for RobBobSmith

Hello all: I am working on a class for creating 2-D arrays. A couple of days ago, someone kindly helped me identify a problem with my operator() expression, but now I'm getting a segmentation fault. I just can't figure out where the problem is! If anyone could take a look …

Member Avatar for RobBobSmith
0
408
Member Avatar for michal_nowak

Hello, I'm completely newbie, I used pairs from <utylity>, but now I'm in need of something like "thirds", so I decided to create a template. I started with: [CODE]template <class T1, class T2, class T3> struct thirds { typedef T1 first_type; typedef T2 second_type; typedef T3 third_type; T1 first; T2 …

Member Avatar for mrnutty
0
138
Member Avatar for smeghead007

Hey guys i need help with my program. What I need to do is to open to inout files. one containing the accout numbers with there names and balance. the second is the transactin history with accout num ie 123 d45.67 d 56.78 w 78.99. My problem is that i …

Member Avatar for smeghead007
0
335
Member Avatar for aswain123

How gdb gets connected to the live boxes and it provides exception if happens?

Member Avatar for SgtMe
0
66
Member Avatar for anthonys1mom

I'm working on a program to convert decimal to binary, octal and hexadecimal. I can get the code correct to convert decimal to binary and octal, but in reverse. I was 'given' the code to use for STACK class to push and pop o reverse teh order, but I'm having …

Member Avatar for mitrmkar
0
2K
Member Avatar for YellowJello

Hi, I'm making three bank account classes but this is just the basic one. I am having trouble with the withdraw function, mainly due to me not understanding how to correctly use the friend method when it come to overloading operators. Any help explaining how to correctly use it in …

Member Avatar for Ancient Dragon
0
186
Member Avatar for merse

Number is always represented with the closest double? A real number is usually between two double representation. Always the closest representation is used or not necessary?

Member Avatar for Ancient Dragon
0
93
Member Avatar for techfish

line 121 (p = j) calls both assignment operator and copy constructor functions. is this normal? also the destructor is called three times. I thought the function should have been called two times. [CODE=c] #include <iostream> #include <string> using namespace std; class Student{ private: //A string that stores the name …

0
54
Member Avatar for rlhh

First, thanks for any replies that I'll receive. I'm currently trying to create a simple 1 player(comp vs player) poker game(simple as in minor game errors are allowed). After I initialize the deck, I shuffle the deck then deal the cards. After dealing the cards, I set the cards for …

0
64
Member Avatar for timdog345

I need t o make these paterns [code] * * ********** ********** ** ** ********* ********* *** *** ******** ******** **** **** ******* ******* ***** ***** ****** ****** ****** ****** ***** ***** ******* ******* **** **** ******** ******** *** *** ********* ********* ** ** ********** ********** * * [/code] I …

Member Avatar for coldzero_82
1
117
Member Avatar for DynamicMember

Friends,i need your advice.i cant find a good program to use and work on C++.At the moment i am using Borland C++ Builder 6,but i also have Microsoft Visual C++ 2o1o.What will u advice?:(

Member Avatar for DynamicMember
0
144
Member Avatar for Transcendent
Member Avatar for merse

I cannot reproduce numeric_limits<double>::epsilon() I have tried the following code: [CODE] #include <iostream> #include <limits> using namespace std; int main() { double x = 1; double s = 0; for(double y = x; y == x; y = x+(s+=x*1e-20)) {} cout << "my calculation: " << s << endl; cout …

Member Avatar for vijayan121
0
231
Member Avatar for VasquezPL

Ok... Here is the problem.. [B]Void extract_data[/B] is used to choose number of paramets I want to extract from Active directory... For exmaple...I choose SAMID, Telephone Number, Manager name...But number of functions may vary...from one to all shown in the menu... [B]Void extract_data2()[/B] is used to use all data gathered …

0
62
Member Avatar for Martje

Hello, How do i resize/stretch the image inside a pictureBox(win32 form)? i was only managed to resize/stretch the border of the pictureBox, but i want to resize/stretch the image itself, how do i do it?. Thank you in advanced.

Member Avatar for Milton Neal
0
2K
Member Avatar for qvyhnl

Write the function my_strchr(). The function has two parameters: a const char * s pointing to the first character in a C-style string, and a char c. Return a pointer to the first appearance of c appearing inside s and NULL (0) if c does not appear inside s. Is …

Member Avatar for Ancient Dragon
0
194
Member Avatar for aznlitomik3

Hi, I'm having an error when running this program and I don't know what kind of error is it. So hoping someone can help me. Thank You!! Program: The input file is created with positive and negative numbers. When program ask for the input file it should be the same …

Member Avatar for Ancient Dragon
0
142
Member Avatar for Joemeister

Hi there everyone!! Struggling a bit with some Linked Lists combined with copy constructors as well as operator overloading. Here is the code of the header (.h) and the implementation file (.C). Hope that you can help! [CODE] /////////////////////////////////////////////////////////// ////////////////// //////////////////// ////////////////// Queue.h //////////////////// ////////////////// //////////////////// /////////////////////////////////////////////////////////// #ifndef QUEUE_H #define …

Member Avatar for phfilly
0
100
Member Avatar for qvyhnl

Write the function my_strncpy(). The function has three parameters: a char * dest, a const char * src, and an int max, which represents the maximum size of the destination buffer. Copy the characters in src to dest, but don't copy more than max-1 characters. Make sure you correctly terminate …

Member Avatar for Ancient Dragon
0
185
Member Avatar for Christ1m

[CODE] template <class T> class Stack // an abstract stack base class { public: Stack() {} virtual void pop() = 0; // all pure virtual T top() const = 0; virtual void push(const T& t) = 0; virtual unsigned int size() const = 0; }; [/CODE] [CODE] template <class T> …

Member Avatar for StuXYZ
0
77
Member Avatar for tKc

I have an issues with my int array, i have a game where its like a mega version of Tic Tac Toe where you need 5 to win instead of 3 and i have tried to come up with a system of checking for a winner or not (right now …

Member Avatar for StuXYZ
0
212

The End.