Beginners - September 2019 (Page 8)

problem with a repeater
 
I have a problem with my program that repeat names,it work correctly first then it glitch out when you use the program loop many times,and else { ...
[11 replies] Last: Hello ahmedddddddd, Just to let you know your link did not work for m... (by Handy Andy)
by Yersy
Function Definition
 
I'm new to computer science and while writing this code I keep having the same error message at line 102-106 where it says function definition is not allowed he...
[4 replies] Last: BTW, another fix you should make, after fixing getUserChoice(). Do NO... (by deleted account xyzzy)
Nested if else within a for loop
 
I'm having trouble making sense of my nested if else within a for loop. I'm betting it also has something to do with the conditions of the if statement. Arra...
[5 replies] Last: #include <iostream> int main() { // Array is not a pre-defined C+... (by deleted account xyzzy)
Determine the weight of the split fruit
 
Hi there I currently finding a question in vjudge interesting so I start to make some code about the input and output and it turns out well until I submit my co...
[11 replies] Last: > each of the two parts weighs even number of kilos You can't split ... (by salem c)
Chain Function Calls
 
Why does the following program not output the same result for both function calls? #include<iostream> using namespace std; class Test { ...
[10 replies] Last: What are scenarios in which each type of copy is made apart from passi... (by darnoceloc)
Read to a file without cin
 
No code to display, I just need to understand how to take inputs from a piece of paper and put them into my C++ code to print to an outfile without using infile...
[7 replies] Last: to read from a piece of paper, you need 3 things: 1) a human 2) a sca... (by jonnin)
txt file not in output
 
I have a txt file added into the source files but the code isn't reading it. I am not getting any error messages. #include <iostream> #include <fstream> #in...
[3 replies] Last: You need: (a) Some lines of the form myFile >> etc. in loadDataset(... (by lastchance)
Sorting and searching data for sales
 
We are doing a program in class to read in about 100 lines of code, store it, and sort it. The code is first an employee's ID number followed by their sales. Th...
[9 replies] Last: Ok thanks guys, I will try to implement what you have said here. We ca... (by XboxOne2019)
Explanation
 
Why does the first line of code function properly while the second line causes errors? int num_twenties{total_pennies / TWENTIES}; int num_twentie...
[5 replies] Last: Apologies for the multiple posts. Thank you all for the responses. (by CodeNovice01)
Error in my code
 
I keep getting the error message: C2065 Line 49 'ID':undeclared identifier #include <iostream> #include <fstream> #include <string> #include "Class...
[3 replies] Last: Main line 49: Where is ID defined? You can't pass a variable that's ... (by AbstractionAnon)
Maintaining list of objects in array
 
I am having trouble with maintaining a list of objects in an array. I need to maintain an array that holds 5 'GameEntry' objects in my 'GameScore' class that ke...
[5 replies] Last: regarding class GameScore : GameEntry which is equivalent to class ... (by ne555)
Inserting data inside array through function
 
I want to add a string into a specific position in an array through a function. The way I tried doing it is by first finding the position in the array, storing ...
[11 replies] Last: yes, whatever number of temporaries that you need > then I proceed to... (by ne555)
Banking system question
 
I'm almost done with my banking system, but I'm trying to figure out how to set up the total_money formula correctly for depositing and withdrawing to keep trac...
[6 replies] Last: Hello Deadweight77, I apologize for this, but I do not use this type ... (by Handy Andy)
by jp22
Validation so that the program only allows entry of numbers
 
Hi, could someone help me with my program. I have my program that is from a restaurant where you have to enter what you will eat for lunch, drink and dessert. T...
[2 replies] Last: thanks for the reply. and if I deal with the ctype.h library (isalpha ... (by jp22)
Simple Bank System
 
Solved
[1 reply] : If you could explain how to do it I can figure it out. Credit will be... (by keskiverto)
Shortening lines of declarations to one line.
 
how may I minimize the ensuing header file declarations, just like how in many IDEs, function curly brackets can be shut to one line I can't simple put curly b...
[8 replies] Last: Thank you ever so much @Ganado ,I'll take your comment as well, I supp... (by closed account E8A4Nwbp)
Any hint on this math problem
 
Any hint on this math problem Yeah, write some code and post it here. Otherwise your "interesting" problem (hint, it isn't) is just a lame attempt to cheat a...
[9 replies] Last: @arshcoc975, If you don't know how to code anything, even a simple pr... (by deleted account xyzzy)
learning threading and other topics
 
Hello, I am trying to learn C++ to get a career in software development, my background is a Sr DBA, but want to jump to the other side, the fun side ;) anywa...
[1 reply] : For thread locking, look up std::lock. In modern C++ (and even older C... (by Niccolo)
by vysero
Code review, look and feel
 
Please take a look at the following function. I am looking for suggestions on readability and functionality; your personal opinions are welcome. This function a...
[5 replies] Last: QML accepts JavaScript so I do have that at my disposal. @Niccolo It... (by vysero)
Can't figure out separate compilation.
 
I have quite a large program that require separate compilation to function. However I simply can't get the program to work. Having scoured the internet and my t...
[18 replies] Last: Doing "stupid stuff" is part of the learning process. Been there, do... (by deleted account xyzzy)
September 2019 Pages: 1... 678910... 13
  Archived months: [aug2019] [oct2019]

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