Beginners - February 2018 (Page 27)

I don't know what's wrong with my code
 
Write your question here. I'am running this program on code blocks, I don't know whats wrong with the code it might be confusing to explain, I recommend you...
[3 replies] Last: @IIGabrielII, this is how the program can look like with functions and... (by longberns)
Program wont function
 
I know I didn't use pow, because I'm unsure of where I would put it. The function of this is to get it to tell me the volume of a cylinder, but I keep encounter...
[3 replies] Last: I came to terms that "return 0;" was 100% useless, I managed to fix th... (by StartUpReboot)
by kam975
need help with a kinematics calculator. if & else statements
 
the objective of my code is to take user input of variables and figure out which equation to use then spit out the appropriate answer to the variable that the u...
[2 replies] Last: holy cow i feel really dumb thanks! (by kam975)
Useful Programs
 
//Palindrome Number Check Program in C #include <stdio.h> int main() { int n, n1, rev = 0, rem; printf("Enter any number: "); scanf("%d",...
[10 replies] Last: Cool! This looks like C though. Not even a single C++ header include... (by icy1)
Stumpped.. Need help
 
I need this program to display the kaperkar numbers from 0-9999. I can not get it to display anything other than 1. Where am I going wrong? Also, we can't use B...
[7 replies] Last: Stuff like this I usually map out in a scripting language of choice. ... (by icy1)
Class compile-time error "C++ forbids declaration of Class with no type"
 
I'm working on a C++ program in which we're learning to properly use a Class. In my program I'm supposed to have a Class named "Car" which has a function called...
[7 replies] Last: @Toasthat, EDIT: Wrapping acceleration / breaking in a while loop . ... (by longberns)
Program not running after log-in / censoring password
 
Hello everyone! I'm having trouble writing my program which is a simple string scanner, i've receently added a log-in screen to it which works fine.. although i...
[1 reply] : Hello Moobman, Although I do not recommend using "conio.h", as it is ... (by Handy Andy)
by thoman
Need help with code
 
https://gyazo.com/857c12e117f157a879b6fa3f6be4e6d7 Can anyone help me with this code and explain step by step what exactly you are doing so i can understan...
[1 reply] : First of all, you do learn much better, when you do your homework your... (by keskiverto)
Why would my programme work only if I put in a "dummy line"?
 
Hi, I am practicing sending pointers to functions so wrote the small prog below to swap 2 numbers via pointers sent to a function. It works fine if I include t...
[5 replies] Last: You're welcome - hope it helped! (by MikeyBoy)
by chuvak
Displaying a .dat file through commandline argument
 
I need to create these functions for my Stations class void update() const - accepts the number of passes sold and updates the data for each station in turn...
[2 replies] Last: Here is the original workshop https://scs.senecac.on.ca/~oop345/pages... (by chuvak)
Getting the memory error of c++ exception of char at memory location
 
I am having trouble with my code compiling. It builds just fine. However when I try to turn it, the code spits out the memory error. I have stepped into the fun...
[3 replies] Last: I guessed at some headers and input file just to run your code. It see... (by lastchance)
simple input program issue
 
Hi, I have a problem where I need some help. The below program is a simple conversion from Dollar to Euro and vice-versa. The issue I have with entering the va...
[11 replies] Last: Hello Danny, Yes I did. I do not use scientific notation very often, ... (by Handy Andy)
bmr calculator
 
I'm having a problem with the program running a continuous loop and not exiting with "Thanks for using my BMR calculator. Good bye!" not sure where I can input ...
[1 reply] : Your while condition while (bmr_Again == 'Y' || 'y'); is wrong. Sho... (by Thomas1965)
Value not coming out correctly in .txt file
 
I'm unsure what I did wrong, but whenever I run my program the value for mCost comes out incorrectly, I'm trying to figure out what I did wrong (This doesn't ha...
[1 reply] : I fixed your program. I also made it a bit cleaner. I took all of your... (by TheToaster)
Better Way to Write this Code?
 
Is there a better way I could have written this trivial program? Basically, it takes an n-sized array of an arbitrary type and reverses all the elements (Yes, I...
[3 replies] Last: > "a" would be the first element, incrementing the pointer by N-1 retu... (by JLBorges)
anybody have done edx computer graphics 167x course homework 2?
 
Write your question here.
[1 reply] : This is not the place to ask these kinds of questions. Nobody is going... (by TheToaster)
Confused about binding rvalue to copy ctor
 
I was looking at cppreference here: http://en.cppreference.com/w/cpp/types/is_move_constructible Near the end, they say this: "Types without a move constr...
[1 reply] : Can someone give a code example of when an rvalue can be bound to a c... (by Peter87)
iterator and algorithm
 
i have a question about std::for_each should i be using this with list or should i use something different when using ostream and i get error but it doesn't cap...
[1 reply] : Write the captures inside the of the lambda. [&os] - captures os... (by Peter87)
by marcb
Calculating max combinations you can buy given a certain amount of money
 
I'm trying to write a program that will give me the maximum amount of items i can buy given a certain amount of money. So far my code only accounts for the max ...
[9 replies] Last: Exactly what I was trying to say about getting them to a common term. ... (by jonnin)
Input error help
 
I am having trouble running my program. My computer said the error has to do with my input. I would appreciate any help. The program is supposed to print the am...
[1 reply] : Line 53 should be: cin >> myCookies.cookiesToMake; and not: cin >> ... (by chicofeo)
February 2018 Pages: 1... 25262728
  Archived months: [jan2018] [mar2018]

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