Beginners - January 2018

Homework Help!
 
Hey all! Need help with some homework... basically i had to build a program where you input your name, weight, and minutes for four activities ... i then had it...
[3 replies] Last: I suggest to add function to display time to simplify code. You can c... (by codehelper)
New to this type of programming
 
I need help :/ According to Good Housekeeping, “water is the most underutilized tool when it comes to your health. From clearing your sk...
[2 replies] Last: Please note that this is not a homework site. We won't do your homewor... (by keskiverto)
Need to call function from within switch statement
 
Im writing a text based adventure game. Im a huge noob to C++, did a Udemy course but didnt understand most of it, so am doing this game and once I am done will...
[1 reply] : Try this // REMOVED A BUNCH OF IRRELEVANT TEXT std::cout << "SCENE 1... (by longberns)
by Raf42
Please explain code
 
Hi, I'm having a hard time as to understand why the answer for b is 4 and for c is 3. Any clarifying comments will be highly appreciated. #include <io...
[4 replies] Last: Ah, thanks jonnin (1964), for shedding some light here. All the best. (by Raf42)
ifstream from one class to another
 
Hello. Imagine a class named Poet, with a member FirstNAme, LastName and class named Verse as Poet's member. is it possible to construct Poet with ifstream, and...
[2 replies] Last: @Eniozat Thank you so much for answering my question! But I've already... (by nick2361)
Pancake glutton 4 stars last step
 
Hello, I have been coding with c++ for about 2-3 weeks now and I have been stuck with one exercise called "Pancake glutton" I need to collect answers from 10 pe...
[1 reply] : @JustinPlusPlus you should make a struct that can hold each person and... (by longberns)
Having trouble with "double"
 
I am having trouble with double. The program seems to rounding when it feels like it depending on the input. Its probably something pretty simple but I thought ...
[9 replies] Last: Hello CantSpel, Another thing you could is remove the comment from li... (by Handy Andy)
C++ Struct array calculate wage
 
I have to calculate the wage for each employee. How would I write a function to do this? And how would I sort the employees according to their wage? #inclu...
[7 replies] Last: Thanks alot I got it to run properly. Appreciate it (by tidematic)
problem with extracting data from file
 
Hello, I'm trying to extract data from a text file and writing them to a vector of testLine objects but getting errors: filesbehandlung.cpp:47:3: error: unknow...
[3 replies] Last: Line 64 should be testLine t{ greeting, fruit, v1, v2 }; . Line 73: ... (by dhayden)
homework help
 
the problem states that the program will run but there are logical errors, im simply too noob to find them can someone help? //Logic errors. #include <io...
[4 replies] Last: Let’s say you can buy 2 pounds for 6$. That means 1 pound = 3$ So yo... (by Lager159)
Trouble getting percentage of number.
 
I am trying to finish the last bits of this homework assignment. My code works for the most part but one line is causing me trouble Everything is working and o...
[5 replies] Last: What is the difference between static_cast<double>(votesTotal) , and... (by Ganado)
HELLP!! I am a complete beginner
 
I want the input to be taken next to the text as shown in the image? image link: https://imgur.com/EOyzqOT This is my code and I use devc++. ...
[3 replies] Last: Hello punchingmachine, Now that you have a better understanding this ... (by Handy Andy)
by al8888
Segfault on deep copy
 
Hi I've got to write a class called course that makes two objects and has a function that one time has a default value when called and another time sets a value...
[7 replies] Last: You should always avoid pointers when you can. You should always avoid... (by Repeater)
Helllo,guys,the bug of 21point poker game
 
I have made a small game in 21point poker for player vs bot.However,the bot always draw the same point with player,how can I fix this issue? #include<st...
[3 replies] Last: thx (by toby1a05)
C vs C ++ and is it worth it?
 
Hello. I have a question. What programming language should I use, C or C++, and should I even use these programming languages? My tasks: Development of appli...
[3 replies] Last: /shrug one way to look at its that you can write c++ code exactly li... (by jonnin)
Help HW
 
The program runs and everything. So, I am guessing I am just missing something simple?
[8 replies] Last: Any one else willing to help? I appreciate everyones time! (by Wholetruth)
by Millet
Help With Class Homework
 
I've been working on the below question for a little bit. I answered all of the questions, but I'm not really sure if they're correct. If any of you could take ...
[1 reply] : duplicated http://www.cplusplus.com/forum/beginner/229520/ (by ne555)
Problem reading char from file
 
The code reads the last character twice. I don't know where is the problem!! here is the code: int main() { ifstream startSeqF; char ID; start...
[3 replies] Last: To read in a character, the file stream simply needs read in a single... (by Ganado)
Odd Output
 
First I add a stock(selection 2) with the input: "add", "18", "300". Second I add another stock(selection 2) with input: "add", "17", "300". Shouldn't the ou...
[2 replies] Last: Whoops. Thank you. (by rjphares)
by Millet
Help Homework
 
I've been working on the below question for a little bit. I answered all of the questions, but I'm not really sure if they're correct. If any of you could take ...
[1 reply] : ¿why the weird quotation signs? ¿did you bother to compile and run y... (by ne555)
January 2018 Pages: 123... 22
  Archived months: [dec2017] [feb2018]

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