Beginners - October 2016 (Page 42)

by egio
How to use count to show how many inputted scores?
 
Hello! I wrote a program that when a user inputs all their test scores, it outputs the sum, the highest score, the lowest score, and how many scores were inputt...
[3 replies] Last: Hit enter at the end of line 14 and write: if(score < 0) break; Al... (by theturk1234)
Menu Help
 
Having trouble with this code: #include <iostream> using namespace std; int main() { char input; int x=0; int y=0; //Display Welcome message cou...
[2 replies] Last: You are amazing :) I have some other issues, if you could help me tha... (by unknown3112)
programming assignment help!
 
Hey everyone, I'm trying to write a program that asks a user to enter the number of cookies they bought and then it is supposed to tell the user how many can...
[2 replies] Last: Also, don't use system("pause") It breaks you code's portability.... (by theturk1234)
I need help with finding another way to involve the key, the way i have it now i cant
 
he program will read a file containing a single student’s answers to a recently given quiz. It will compute the student’s grade on the test as a percentage,...
[1 reply] : Online 48 you are losing information. Dividing an integer by an intege... (by theturk1234)
2 errors, 1 warning
 
Dont really know whats happening with my code here. #include <iostream> using namespace std; int main() { int num1; int num2; int temp; bool...
[1 reply] : Line 15 should be: if (num1 >= num2 && num2 > 0) You also need an op... (by theturk1234)
by egio
[while loop] How to print average score after dropping highest and lowest scores?
 
Hello, I am writing a program that will print the average score after dropping the highest and lowest inputted scores. I am trying to use the variables 'hi',...
[4 replies] Last: Thank you for all your help!!! (by egio)
Confused on when to use virtual destructor
 
I read things that are conflicting with one another. Many say only use virtual destructors when you use virtual functions or polymorphic class. Then I read clas...
[1 reply] : In general, for a class that is designed to be at the top of an inheri... (by JLBorges)
Function Help !!
 
How would i turn this into a seperate function. Im not sure how to organize the return part of the function. distancex=((point3-point1)*(point3-point1)) ...
[3 replies] Last: usually a good programming practice (read it on forms) is to define ... (by shadder)
Dynamis array with a pointer?
 
Not sure how to start this? Write a program that uses a dynamic array that contains 5 items of double values. The size of the array is entered when the program ...
[2 replies] Last: Is this all the question is asking for? #include<iostream> #include<s... (by shannonhos)
Initialization of an object of a class
 
I would be really appreciated if you can clarify for me the following issue: Why the ways of initialization in the bellow code work? and they give the same res...
[7 replies] Last: Another issue: why in the following case, the assignment can initializ... (by ivanov ivan ivanovich)
Add up decimals
 
Is there any way i can the compiler to add decimal numbers number that the user input. if user put in 156.7, 76.4, and 54.1 how can i make a program that wil...
[1 reply] : This should help, this code snippet would output 0.7 int main() { ... (by joe864864)
Saving some variables in an array using for loop
 
I want to save some variables in an an array(a) using for loop. here those variables are even numbers. I used below code using malloc function in stdlib.h ...
[5 replies] Last: @krako @kamal this works when array size is known but what if the size... (by cppfighter)
Reading an int from a string
 
Hello, I am working on a decryption project, and I am trying to decode this message using a Caesar Cipher method. 13nggnpxongx3933&7#10 "13" being my sh...
[2 replies] Last: create a function to check each char of a string and see if it's a '0'... (by SamuelAdams)
bowling score help
 
Alright y'all I'm not sure if I'm doing this correctly or not...so any help would be great. I also plan on implementing a do while loop I just haven't yet till ...
[11 replies] Last: #include <iostream> #include <string> #include <cmath> using names... (by Unisaurus)
while and for
 
Hi, it take me awhile to figure this out. But I don't get one thing. Why do I must use (for) to make it work? I tried to use while. It doesn't work at all. ...
[4 replies] Last: @newbieg Willo123 put it for me I guess. But I tried your. It work bu... (by soulworld05)
'saleFalg' was not declared in this scope
 
I'm a CS1 student and I'm almost done with my lab. I need help though because code::blocks says that I haven't declared the bolo variable saleFlag within the sc...
[7 replies] Last: Thanks for you help AbstractionAnon & Jlb. (by TheEurekaMan)
Snake Game
 
How could I make the tail of the snake to grow? #include <iostream> #include <string> #include <stdlib.h> #include <conio.h> using namespace std; bo...
[1 reply] : Please indent your code and put it between code brackets, which is the... (by newbieg)
Can I have a switch statement in a separate function and call it into main?
 
Can I have a switch statement in a separate function and call it into main with its variables? It's an odd question and I don't quite know how to ask it but ...
[5 replies] Last: Lines 18-22, 54-58, 99-103: These constants are repeated. While gene... (by AbstractionAnon)
How to create free function template which accepts only vector of pointers?
 
Hello, Currently I have such code: class MyElem; typedef std::vector<MyElem*> MyElems; To clear a memory taken by such vector I am using thi...
[no replies]
Help Setting Up VSCode (Step By Step)
 
Could someone help me with setting up VSCode to compile and run C/C++? I have installed the cpptools. I know I need to install a compiler next either clang or V...
[1 reply] : Hello ZennMystic, Welcome to the forum. I am not familiar with VSCod... (by Handy Andy)
October 2016 Pages: 1... 4041424344... 51
  Archived months: [sep2016] [nov2016]

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