Beginners - November 2013 (Page 43)

by beebe
Best practice with classes question
 
Let's say I write a program with several classes so that I get something like this: mainHeader.h, mainFunctions.cpp, main.cpp, class1.h, class1.cpp, class2...
[no replies]
by beebe
Add objects to an array by reference?
 
I have 2 classes Business and Customer. Each Business holds an array of Customer objects m_curPatrons , which represents the patrons of that particular business...
[2 replies] Last: It turns out it won't matter. I'm going to copy the customers into the... (by beebe)
Counting vowels function
 
This function is supposed to take a sentence the user enters and add up the vowels within this sentence and return the number of vowels. Right now the function ...
[2 replies] Last: awesome, I get what you're saying. thanks for the help, i knew it wasn... (by pepstein)
why use map.insert
 
why would you use map.insert to insert a pair if you can just use map = VALUE? int main(){ std::map<std::string, std::string> m; m.insert(std::pa...
[2 replies] Last: Thanks histrungalot (by metulburr)
measuring elapsed time
 
using linux... I tried numerous suggestions, mostly a version pertaining to : #include <iostream> #include <ctime> int main() { clock_t begin = clock...
[2 replies] Last: Thanks (by metulburr)
Holdem problem using basic C++
 
First off I am not asking for a written script to steal and pass my c++ course. A sample script would help me by looking at it figuring out what I need to do.I ...
[2 replies] Last: Personally, I rather hate it when professors say "you can only use wh... (by MikeyBoy)
Array Issue
 
I need to get the "digit" to correspond to the correct number in the digits_seen array and set to "true" so I can then test if the numbers in the array equal to...
[3 replies] Last: So far so good. Line 24: Uuuum. Look closely at which equals you're u... (by Albatross)
help
 
can someone show me how to change this into arrays // Maths Helper #include <iostream> using namespace std; char menu() { char choice; ...
[4 replies] Last: I am trying to create a code which will generate a payslip. Please d... (by MikeyBoy)
by R57x
int error ?
 
hi guys; my have a problem do you help me ? error screenshot http://img35.imageshack.us/img35/4062/x0ua.png #include <iostream> using namespace...
[3 replies] Last: You're welcome :) (by MikeyBoy)
There's smthg wrong in the main but i dnt know what
 
Write a class Employee having ID (int), name(string) and salary(int) as private data members. Provide a constructor with default value, a set function, and over...
[4 replies] Last: mickeyboy i ddnt understand what you mean (by gachedid)
Please really need help with overloading operators!
 
Thank you
[10 replies] Last: But could I have just done only for the top part and would it still w... (by Catfish666)
Problems with char and logical operators
 
Hey! I'm just starting to learn C++ with Bjarne Stroustrup's book, and in the drill on page 83-83 it asks you to create a program that emulates you writing a le...
[3 replies] Last: Fantastic! That worked like a charm. Thanks so much for the quick ans... (by Cosmonausta)
AVL Tree Insertion
 
I'm using my insertion algorithm from my binary search tree and I'm unsure of where I would put my updateHeight() and rebalance() functions. I know with AVL tre...
[2 replies] Last: Sure. I sit in the back left corner by the pencil sharpener in class. (by natekelsey)
by amj89b
Help with "undefined symbol main" error for a function assignment
 
Hi, I am getting the following error when I try to compile: Undefined first referenced symbol in file get...
[2 replies] Last: Thank you ! ! ! ! ! ! ! (by amj89b)
by olezek
From main to functions
 
Im new to programming and i dont know how to make my code into functions, basically i want to keep my main function as clear as possible. The code generates ran...
[2 replies] Last: thank you that will work ! (by olezek)
dynamic created nested for loops
 
I amk trying ot think of a method on how to create dynamic nested for loops, although i am unsure on how to accomplish this, for example, i was thinking of a me...
[no replies]
Need help with program debug please
 
I'm supposed to be debugging this source file so that it works properly. There are a total of 6 errors in the file and I've found 4 so far. I can't figure out t...
[3 replies] Last: I found another error but can't seem to find the 6th one. The program ... (by btwHendo)
by Ausha
really need help with string!!!!urgent!
 
This programm counts words from input and then i have to print out the longest word, im i bit stuck on that, need to somehow loop trough all words and compare t...
[9 replies] Last: You obviously will print nothing during the loop. If you had an array... (by keskiverto)
by uurll
Need Emergency Really Beginner Help !
 
Hello all , i'm a first year computer engineer student and have an exam tomorrow. The teacher gave us some practice questions for the exams.. Can someone help m...
[2 replies] Last: well , what did i do wrong? I didn't post homework questions :S (by uurll)
by JB1988
Problem with dynamic array
 
I want to calculate which modi are present in the numbers that the user gives in. This is the code: #include <iostream> #include <stdlib.h> using namespace s...
[no replies]
November 2013 Pages: 1... 4142434445... 80
  Archived months: [oct2013] [dec2013]

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