Beginners - February 2014 (Page 57)

How do you modify a getValue?
 
So I need to sort all of the getPrice array values in order by price in ascending order. The ones I need to cout are supposed to be under $25,000. I need to cou...
[1 reply] : You can return it as a reference or pointer instead of a copy then you... (by giblit)
Formulas?
 
I need help writing a formula to solve a simple workplace problem. The situation is: "Workers at a particular company have won a 7.6% pay increase retr...
[7 replies] Last: There is no need to make it a global in this program. (by giblit)
Reading from a file multiple lines.
 
Hello everyone! Implement an abstract data type usedCars with private attributes year(integer), make(string), model(string), miles(integer) and price(float),...
[6 replies] Last: Thank you! What confuses me is why would the teacher give this assign... (by DeathLeap)
Program that Counters # of Objects in a Given Program?
 
Hi guys! I have been given an assignment to develop a program that counts the number objects in a program. I already developed a program that counts LOC in a...
[1 reply] : You could make a counter class with a static count and use it as a par... (by giblit)
Template Classes
 
I'm trying to learn template classes but am having some trouble. I keep getting "unresolved external" errors but finally narrowed it down to 1 error. Minmax<T...
[2 replies] Last: nevermind lol. Thanks a bunch dude everything works great! (by unsensible)
exceptions
 
Write a C + + program that asks the user a value for the width; and then displays the corresponding square area. If the width is not an integer, the situation w...
[2 replies] Last: int width; for (std::cout << "Enter a value: "; !(std::cin >> width);... (by Smac89)
expected unqualified-id before ‘{’ token
 
hi all, just started a part time c++ course at cardiff uni and am stuck on my first excercise in "Class". I have found 2 similar answers on the net but they us...
[4 replies] Last: Thank you jidder (123) you are my hero. I have just tried it and it w... (by daabren)
Use of const_iterator
 
Hello all, I'm trying to compile the code of Accelerated C++, page 105: the split function: vector<string> split (string& str) { vector<string> re...
[4 replies] Last: This is fantastic! Thanks for the very fast help! (by gabrielh)
Handling huge numbers
 
Hello friends, I'm currently doing Project Euler Challenge 8 where you have to find the largest product of a series of 5 digits in a 100 digit number. T...
[4 replies] Last: Great, thank you. (by Fauch911)
by Skarma
User created cosine function producing incorrect output
 
I need to create a cosine function that mimics the standard cos() function using McLauren's Series. I have already correctly implemented a sine function. The pr...
[9 replies] Last: Chervil: Thank you, your suggestion worked. (by Skarma)
Help with little histogram program
 
For an assignment I have to make this little thing that displays crude histograms. i'm getting this error, and I can't figure out what's wrong, help would be gr...
[2 replies] Last: fixing 22 and 25 fixed the issue, thanks! once it was mostly working t... (by w7y7a7t7t)
Specific operators
 
Which are the specific operators to c++?
[1 reply] : http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B http://en.cppr... (by Catfish666)
addin files
 
Alright I know that a program can add files and even search in the database for matching file's but how would one make something that can add a file based on wh...
[2 replies] Last: Alright thank you so far this is doing everything I need it too have a... (by ProgramMaster)
Constructors order
 
A class Y contains a member object of type Class X. What is the order of execution of constructors and desctructorilor two classes when creating an object of ty...
[3 replies] Last: when you create an object of the class Y, constructor of class X is ca... (by rich1)
by Mishu
bt.exe has stopped working
 
Write your question here. #include <iostream> using namespace std; struct node { node *left; int data; node *right; }*root=NULL; nod...
[1 reply] : What's the point of passing a pointer to add if you never use that poi... (by Peter87)
by AmitH
Dynamic allocation
 
Hi all. I have a question about dynamic allocation of pointer. If I allocate a pointer normally (not dynamically), if the pointer is uninitialized, probably...
[3 replies] Last: Thanks! (by AmitH)
Including a header vs forward declaring a class
 
Hi, I need some clarification regarding the title statement. Suppose I have a project with multiple classes. If class A has a member variable of class B, ...
[3 replies] Last: A few more basic questions: How does a compiler interpret a forward d... (by wannabeCoder)
No output in win32 console [VCPP2012]
 
Hello cpp com! I want to create a console program displaying all my key presses. So I created a script including all important things. But what is wrong? No ...
[2 replies] Last: @NT3 Thank you! That worked pretty well. (by Subbestionix)
C++ ARRAY
 
This code isnt finished yet. But is this some kind near to this program? Input year level and age: 1 16 Input another? Y/N: Y Input year level and age: 5...
[11 replies] Last: [quote=jidder]If you use negative numbers it reads back from the end o... (by TwilightSpectre)
simple calculator
 
I am currently taking a class and one of the problems is to make a simple calculator. I have been able to make the code work but the out put isn't what the tea...
[2 replies] Last: You forgot to put cout<<fixed; #include <iostream> #include <iomanip... (by SorinAlex)
February 2014 Pages: 1... 555657585960
  Archived months: [jan2014] [mar2014]

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