49,761 Topics

Member Avatar for
Member Avatar for .:Pudge:.

My code works fine for smaller integers, but when it gets over 1 million or so the number changes or goes negative. I am sure this has to do with the range of int, but I tried float and double and all the numbers came out the same...... What is …

Member Avatar for .:Pudge:.
0
138
Member Avatar for Alec0905

Hey Guys, I had a question earlier about some bounds and i've got it all figured out after some intense debugging and some help. I just have one more simple question and I think I should finally be on my way. If I have a recursive function that returns an …

Member Avatar for Alec0905
0
199
Member Avatar for Gumbo

Hi I'm doing an assignment on Rational Number calculations. I'm getting some compiling errors which I don't know how to fix. Here is the error message and the code is beneath the error message. I would really appreciate if someone could read over this and see if you know whats …

Member Avatar for Gumbo
0
183
Member Avatar for achieve_goals

Hi, I am trying to make a word counter, for that I have to input a string line untill '@@@' character is entered. My problem is that when I enter "Hello hello" as my input it reads the last hello twice.. or this is what I think it does.. Right …

Member Avatar for achieve_goals
0
315
Member Avatar for Bri426

I'm working on a program for my C++ class. The assignment uses a file that includes student names and three test scores. For example: Name Test1 Test2 Test3 Name Test1 Test2 Test3 My teacher wrote the main part of the program for us and we are to write the functions. …

Member Avatar for Bri426
0
170
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
164
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
337
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

The End.