Beginners - March 2018 (Page 19)

where to put while loop
 
this is my little problem. i have a add element exercise which is to add element in the last row and i decided to put a condition where if the element is alread...
[6 replies] Last: Hello newguy17, Just so you understand this: i just thought that it... (by Handy Andy)
Using Nested Loops for Sigma Summation
 
Hello! I am attempting to write a program that takes the following sigma function n ∑ (ax - ib)^c i=1 and outputs the sum of the equation given u...
[4 replies] Last: I just learned about function calling That's great. The code you s... (by Repeater)
c style strings
 
Hi guys this is probably a pretty trivial question but a question that is quite important non the less,anyway for best practice its obviously best to use std::s...
[6 replies] Last: thanks guys makes sense now :) (by adam2016)
Median of numbers
 
How to improve this code? TASK: Find median of given numbers. Print the integer part of it. Sample Input: 1 3 4 60 70 50 2 Sample Output: 1 2 3 ...
[5 replies] Last: The problem is that you're sorting the vector after reading each numbe... (by dhayden)
Using Nested Loops and Call Functions for Sigma Summation
 
Hello! I am attempting to write a program that takes the following sigma function n ∑ (ax - ib)^c i=1 and outputs the sum of the equation given use...
[6 replies] Last: Hello juliabrushett, Refer to JLBorges's example for a more proper fi... (by Handy Andy)
Need Help With Classes/Vectors
 
I am currently working on a class project and am having difficulties figuring out how to properly execute my code and what to include into main.cpp. I am to cre...
[1 reply] : I am to create a vector of employees (ability to add/remove them), cr... (by kbw)
1-How to specialize a class template?
 
Hello Community, First of all sorry for opening up a new topic on essentially the problem. [See: http://www.cplusplus.com/forum/beginner/231931/ ] Since this i...
[17 replies] Last: keskiverto, I see the point. This is not only true for the vector vs. ... (by Misenna)
Input for QT console application
 
I simply would like to get input from the user for a QT console application via the command line. I have tried getline to store the input as a QString but ke...
[no replies]
Rounding?
 
Write your question here. Hello! I am writing a bit of code, but the issue I run into is the that values are wrong! :( I notice that it is not rounding up, I ...
[4 replies] Last: > After going through the function actualRadius I get a return Value o... (by JLBorges)
by mvlach
Code for Hailstone sequence
 
Hi, I need help writing the code for a hailstone sequence using a recursive function. So far, I've managed to make a program that outputs the sequence perfectly...
[1 reply] : You could pass a counter thru as a parameter. For example: int hails... (by kbw)
Program calls function one too many times
 
I am currently working on a Bull Cow Game game in Visual Studio wherein the user tries to guess a psuedo-randomly selected Secret Word and the console outputs h...
[8 replies] Last: Thank you for being so helpful, Andy! I just want to let you know I ha... (by vaderboi)
Class C++
 
Question: Your class should have functions called void setvalue(int index) and int getvalue(int index) that allow you to set and get the value in the array at...
[2 replies] Last: #include <cstddef> class MyArray { private: // ... (by JLBorges)
Gasoline Check ussage
 
hello guys, iam still very beginner in this programming c. and my friend ask me if i can make this coding possible, so here is the case : An automotive com...
[1 reply] : how does that help you create it ? (by SamuelAdams)
Geometry Calculator code Conundrum
 
I am a beginner to programming and taking a c++ class at my local college as part of a career/major change. I've worked out most of this code for an assignm...
[4 replies] Last: Okay, I've been pouring over this for some time now and am hoping some... (by Armygun087)
by zed150
what is wrong with my code
 
when i enter donald it returns duck but when i enter mickey it returns duckmouse and so with goofy..... what is wrong ??? int len; string t; ...
[2 replies] Last: Thx alot XD. (by zed150)
Function Modularity and simple code
 
Write your question here. Okay, so I've gotten what I think is a good start on this project, not sure though. I am confused on how to make my program be able t...
[1 reply] : This is updated code.... My main problem is when i run the code it pro... (by jaredv11)
Adding spaces between each character in a string
 
Hello! I have been struggling with this program, the prompt and the code I have created thus far is below: Create a program that includes a function called ...
[3 replies] Last: #include <iostream> #include <string> using namespace std; string s... (by lastchance)
by column
Where is defined static_cast casting rules?
 
Hello. Code below casts int 10 to vector of size 10. But where are defined such casting rules? Is it possible to find in c++ documentation such casting ru...
[2 replies] Last: The standard defines the precise rules. Draft IS: http://eel.is/c++dra... (by JLBorges)
Help with Syntax
 
On the reference page for Classes(II), here: http://www.cplusplus.com/doc/tutorial/templates/ , the code example at the bottom of the section "Const member func...
[1 reply] : I always have problems with Syntax :( You've been studying for a long ... (by trylib)
2D Vectors Cause High Memory Problem - Why?
 
I'm C++ beginner and converting my Python code into C++. (calculation speed problems) I use Visual Studio as C++ IDE. The problem is that memory usage is...
[10 replies] Last: Since they are sparse, you should create (or find) a class that will h... (by dhayden)
March 2018 Pages: 1... 1718192021... 29
  Archived months: [feb2018] [apr2018]

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