Beginners - December 2019 (Page 8)

by SuddeN
Binary to decimal conversion not working
 
Im having trouble getting this function to work. I need to take an 8-bit binary number in as a strin...
[6 replies] Last: #include <iostream> #include <string> using namespace std; int Conve... (by lastchance)
function pointer
 
For the bad_alloc &. what does & do? And for delet co, does it delete also the *ret in concat func...
[1 reply] : catch (const bad_alloc &) { die("allocation failure"); } The throw... (by keskiverto)
Templates
 
If possible how do you make templates carry over to other functions rather than rewriting it as such...
[2 replies] Last: Now, looking at your code: what do you mean? Is it like this? templ... (by highwayman)
Using namespace
 
Is the use of using namespace std fine in these situations? #include<iostream> #include<string> ...
[2 replies] Last: Not using using namespace std; is not a status symbol. If only it wa... (by againtry)
String concatenation in C++
 
Hello, I have two problems in the below code. (line 20 and line 30) 1. I want to save the name as P...
[1 reply] : Convert the integer to a string with std::to_string https://en.cppre... (by JLBorges)
Display the weekday by input month and day
 
like this Sample display12 25Wednesday
[5 replies] Last: http://www.cplusplus.com/reference/ctime/mktime/?kw=mktime (by againtry)
IS VALID FUNCTION
 
I need some help on a few things. Include a function named isValidPassword that will complete...
[6 replies] Last: #include <iostream> #include <string> #include <ctype.h> using names... (by kbw)
by noyou
Struggling to complete this program
 
I am having some trouble finishing this exercise here. I am supposed to have this program run normal...
[2 replies] Last: double amountAllowableMeals = 0.0; if (timeOfDeparture > 07.00) ... (by noyou)
Help please
 
Write a program that reads students’ names followed by their test scores. The program should outpu...
[1 reply] : Hello BatJuan72, I was looking over your post and wondering if you ha... (by Handy Andy)
Computer Science Final (1,2)
 
1. Given an integer ‘a’ and an integer ‘b’ write an IF statement that executes when ‘a’ ...
[28 replies] Last: #3: The condition for a while loop goes inside the parentheses: while... (by dhayden)
Blackjack
 
This program works but it only prints and asks if the player would like to play again..and nothing e...
[4 replies] Last: When the computer wins, what score does the human have and what score ... (by Repeater)
various examples of looping programs
 
give me an example of a loop program using the for , while ,or do while functions !
[1 reply] : while ( input != correct_password) { cout << "Wrong password. Try a... (by Repeater)
Find an nth element in an integer number
 
Hello, I want to find an nth element in an integer number. (from the left) For example, the number i...
[4 replies] Last: partially. Here, no loops: #include<iostream> #include<cmath> usin... (by jonnin)
Genetic Algorithm NEED HELP
 
So I've developed my code near completion. Each function operates functionally on there own. However...
[4 replies] Last: I really am sorry for the lack of comments. In the moment I hadn't rea... (by thomash16)
Program returns 0 instead of going back to main menu
 
I've been writing a code for a uni assignment that includes a main menu (to go by each different act...
[4 replies] Last: Thanks a lot man, deleted the cout cin and it worked. can't believe it... (by carmel b)
by seatea
Beginner programmer - help with authentication problem
 
Hi folks! I will be asking forhelp with an assignment and don't expect you guys to do it for me, b...
[13 replies] Last: The name of the function was chosen by our teacher, and we are not all... (by seatea)
How do I fix my loop?
 
How do I fix my code to where the student and assignment numbers aren't set as just single digits? I...
[4 replies] Last: My pleasure :) (by H00G0)
Euler Problem from Hackerrank, code complete but not correct
 
Hello everyone, Im in my 2nd course for programming and learning c++, for a final I was tasked with ...
[13 replies] Last: I don't know, I haven't seen a link to the actual question yet. It'... (by dhayden)
by jf3238
New to c++ and need finding an error in my code
 
Hello! I have an upcoming project for one of my coding classes and I am having trouble finding whe...
[3 replies] Last: #include<iostream> #include <ctime> using namespace std; int AskRan... (by againtry)
by medosz
terminating loop
 
I am trying to write a simple money exchange program. The following should happen: User enters maxim...
[2 replies] Last: I made some changes, but the problem is from the second loop it doesn`... (by medosz)
December 2019 Pages: 1... 678910... 13
  Archived months: [nov2019] [jan2020]

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