Beginners - June 2012 (Page 8)

vector to cstring
 
I created a madLib Program for a class of mine using vectors. I used vectors because the person that was helping me said that it would be easier to use then cst...
[1 reply] : Also to note. Because of my changes, this wont compile anymore but tha... (by kmilnedc)
Dynamic memory
 
I wrote this program for practice, and to test my code. There are a few problems. First, I tried to make my copy constructor and assignment function correct...
[1 reply] : You need *length=*(cpy.length); , since the length variable of cpy is... (by rollie)
Glass Rod Project
 
I'm working on a project, and can't seem to get the project to get the triangle variable to increase when the conditions are met. I need this number to be accu...
[4 replies] Last: I appreciate all the feedback. Below is what I ended up with, thanks ... (by CoryMore)
confused on classes
 
I'm doing the playing card program. The step I'm on is to sort the deck after shuffling it, so I can then perform a search. the private member "int initInde...
[no replies]
Adding an extra 2
 
Can someone explain why I am getting an extra 2 added to my sum PLEASE!!! int LoopEvenSum (int num, int &finalLoopSum) { //will compute and return ...
[19 replies] Last: Also, would I be wrong in using int rather than void? I noticed you a... (by scu1casper)
Recursion
 
Can anyone explain how to do the calculation I have below using recursion?? int RecursiveEvenSum (int num, int &finalRecursiveSum) { // will compute...
[2 replies] Last: Recursion means to have the function keep calling itself until some co... (by fg109)
Printing an ASCII character from a hex value
 
I have a string that holds a series of hex numbers. Each pair within this string translates to an ascii character. I need to print out the ascii translation of ...
[7 replies] Last: http://cplusplus.com/reference/iostream/manipulators/hex/ I've never u... (by Mathhead200)
by ndavis
Aligning decimal points
 
I have a assignment, and im not asking for anyone to do it for me. But it is a simple beginers class and i have to make a simple tip calculator the problem i am...
[1 reply] : Look into the setw() function: http://www.cplusplus.com/reference/iost... (by ascii)
printf format - frontslash
 
Hi, I would like to print out a frontslash ( / ) in a printf. Is there a special code for that? My google search didn't help me much... Thank you Sky...
[2 replies] Last: With you, no problem anymore!! Thanks a lot (by Skyboarder)
Number of words in a string.
 
I am trying to count the number of words in a string. I believe I have it set up right, except it seems to be looping through unlimited times. Why will it no...
[15 replies] Last: Also you can write own class Sentence and overload such operators as +... (by vlad from moscow)
Copy vectors
 
I want to copy part of one vector onto another vector. Is this a good way to do this . . . std::vector <int> vector1; std::vector <int> vector2; for (in...
[4 replies] Last: It is done very simply. Instead of this compound code std::vecto... (by vlad from moscow)
Problems with Binary Search Tree
 
Hi, I have a problem how to implement in the code the successor and the predeccesor. Thanks in advantage. #include<stdio.h> #include<stdlib.h> #include<c...
[2 replies] Last: what do you want from us ? (by gelatine)
by j2tt
reducing fraction
 
hello, I am writing a c++ program to reduce/simplify a fraction 21/14 -> 3/2. I have to use struct Fraction and write 3 functions enter(&fraction),simplify(&f...
[3 replies] Last: For GCD: http://en.wikipedia.org/wiki/Euclidean_algorithm Also, use co... (by closed account 3TXyhbRD)
Whats The Difference ?
 
Could anyone tell me what the difference is from buying a c++ compiler than just downloading a free one like codeblocks ?
[2 replies] Last: codeblocks isn't a compiler. It's an IDE. You have to tell it which co... (by Moschops)
Bitcopy versus initialization question
 
Hi, in my quest to learn C++ using Bruce Eckels book, a chapter is dedicated to the copy constructor. While experimenting with the situations presented I trigge...
[12 replies] Last: No, it doesn't. The destructor will only be called when 'h2' goes out... (by Lowest0ne)
HELP!!! about quick sorts
 
I have to do this, but i don't know how, and I asked to student's of informatics, and they don't know how to do!! :S Assigment 3 You have to implement quick...
[1 reply] : We don't do homeworks. The QuickSort algorithm is explained in multip... (by webJose)
Help please
 
hello, I am writing a unit conversion program (feet,inches, meters miles) the program is to enter what the user wants to convert from and what they want to con...
[4 replies] Last: Consider doing 2 conversions - sounds mad, but here me out. Say you h... (by TheIdeasMan)
Taxrate Payroll Program(Help Finding Error) (1,2)
 
#include <iostream> #include <fstream> using namespace std; int main () { ifstream input;// Declare file streams. input.open("employee.txt"); //Op...
[34 replies] Last: Hey Wilson I'm continuing to work on my Payroll Program and I have a q... (by LaC0saNostra)
Need to repeat from an input file
 
I'm very new to programming and this is my first programming course in college. Here's what I have: #include <iostream> using namespace std; int main()...
[6 replies] Last: Thank you very much (by LaC0saNostra)
ERROR.
 
For this lab it just has errors if someone can figure out why it would be very helpful. //Define Stuff #define STARS "\t************************************...
[4 replies] Last: //Define Stuff #define STARS "\t************************************... (by Soxki)
June 2012 Pages: 1... 678910... 51
  Archived months: [may2012] [jul2012]

This is an archived page. To post a new message, go to the current page.