General C++ Programming - October 2016 (Page 12)

does any one tell me why my 2 for loop does not work
 
this program find the max and min number only 3 number #include <iostream> using namespace std; void maximum(int a, int b, int c) { int i = 0; ...
[2 replies] Last: Actually, I have no idea why you use a loop here. It might be appropri... (by lastchance)
Average Score
 
I am writing a code for the following problem. A particular talent competition has five judges, each of whom awards a score between 0 and 10 to each perfo...
[1 reply] : http://www.cplusplus.com/forum/beginner/200152/ (by integralfx)
by hzahid
Infix to Postfix - Debugging Code
 
I've created a basic infix to postfix converter using C++. I have a couple errors that I'm not able to figure out. 1. My do-while loop only displays the sstre...
[no replies]
need help
 
can anyone help me with this question plz? Given a sequence of positive numbers, we can know whether the values of these numbers becomes larger and larger (i...
[2 replies] Last: 1. Store the numbers in a vector<int> container. Why vector? Because t... (by gunnerfunner)
Default Parameter Question
 
Assuming a code snippet like the one below. How would you go about adding default parameters? int *arr(int size, int val){ int *a = new int ; for (in...
[2 replies] Last: Oh cool, thank you! (by PajamaLlama)
by Xieni
Whats up Bros?
 
Im new here how you guys doing? Love c++! Gonna put out a recent puzzle game soon.. btw i lost my mom
[1 reply] : Great, welcome aboard (by SamuelAdams)
The 3n + 1 Problem From UVa Online Judge - Help Needed in Understanding It
 
Here's the link to the problem's page on the online judge site: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&page=show_probl...
[13 replies] Last: For the one integer field thing, I was talking about this: Create an ... (by DragonOsman)
If a class Derived inherits publicly from a class Base, is it always true that C style cast is going to work?
 
Hi, Yes, I know C style casts are bad news, but I am trying to pinpoint the only places where they can be used without danger... I am proposing the following ...
[3 replies] Last: Yes, I know C style casts are bad news, but I am trying to pinpoint t... (by jlb)
Finding the Mean and Average of a Set of Temperatures
 
In Stroustrup's intro C++ book, Proggramming: Principles and Practice Using C++ 2nd Edition, there's an example code for a program that finds the mean and media...
[3 replies] Last: Working? Lets see, I have two temperatures. The temps.size() is t... (by keskiverto)
by Wabush
Comparison of doubles and problems associated with it
 
Hello ! First of all, my apologies for the horrible formatting, I wasn't able to make it work no matter how hard I tried. So I've had a problem bugging me for a...
[6 replies] Last: Thank you for your answers, I'll keep searching on my side and just ma... (by Wabush)
Newline strangely persists
 
Hi everyone, I wrote a small menu which is accessed from a string a user is prompted to type. After the string is sent with the return/newline key, I have a ...
[1 reply] : What you type goes into a buffer. Your program removes some things fr... (by Moschops)
by lnp657
Error storing objects of a class in a linked list
 
Confused on why I'm getting an error when I try to store information into a node of type Student (they're different data types so I figured this would be best) ...
[8 replies] Last: It shouldn't compile because on line 26 of LinkedList.h you promise to... (by Moschops)
by king16
Calculates julian day-of-year
 
fds dsf ds
[2 replies] Last: This might help with a visual clue http://www.fs.fed.us/fire/partners/... (by SamuelAdams)
by DTM256
Standard Abbreviations - clock_t?
 
Hey guys, I want my code to be easily readable by all who needs to read it. Therefore, I want to stick with standard abbreviations through out my code. For e...
[8 replies] Last: What you're calling "speed" is the inverse of speed. In this case, com... (by Moschops)
by Scuffz
adding two seperate arrays into one is displaying garbage
 
I'm trying to obtain a large integer (20 characters long) get it from a string then put it into an int array and do the math from there, I'm trying to add the t...
[1 reply] : // if operator is + int sum ; //uninitialized if(operation == "+") ... (by ne555)
by Scuffz
cout an array and its displaying "-48"
 
I'm trying to obtain a large integer (20 characters long) get it from a string then put it into an int array and do the math from there, I'm trying to display t...
[2 replies] Last: thanks! (by Scuffz)
by d3v4l1
What did I miss? (Templates, Classes, Linking)
 
Hey guys. I'm stuck with a linked list class I was aiming to make generic after writing it successfully without templates. So here's my main.cpp file: ...
[10 replies] Last: No. ListNode<T> const *iter = head; is semantically equivalent to... (by mbozzi)
by king16
TotalUp Array
 
Hey, guys, I got this code written but I don't know how to following things: a. Total up the numbers in each row and print the total at the end of the row b. To...
[9 replies] Last: Here is what I did but still not printing the total of row, column, o... (by integralfx)
I/O files program
 
I am given two files to work with. One lists popular baby names that are ranked by their popularity, the other is a list of all the names in my class. I have to...
[1 reply] : Well that's a good start congrats ! It seems to me you need to start ... (by SamuelAdams)
This is homework but if you don't help me I will fail
 
So unless anyone wants to see my fail my programming class. HELP ME!!!!!!!!!!! 1) Create two new Vector objects, stored in separate variables 2) Print out each...
[4 replies] Last: Yes, I should. Vector ()? (by Pecardo Hofley)
October 2016 Pages: 1... 1011121314... 23
  Archived months: [sep2016] [nov2016]

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