General C++ Programming - March 2018 (Page 7)

Trying to check if this program's logic is off
 
I have to write a program to calculate the batting average and slugging percentage of a baseball player (using random number generation to simulator a few thous...
[1 reply] : Add a line outputting the values used in line 45. Use your own eyes to... (by Repeater)
Plethora of Issues
 
Hello folks. I have been running into many issues with this code. I know that it is wrong but I do not know why. Any advice is appreciated. -=+=- You are to...
[4 replies] Last: Your code still doesn't compile: In function 'int main()': 24:6: war... (by Thomas1965)
by Yago
C++ fake virus
 
Hello friends, I created a program that, among other things, download a txt file from the internet, reads it, if necessary, modifies it and then recharges it o...
[7 replies] Last: That depends on the file, server type and programs installed. You coul... (by SamuelAdams)
I tried to run this on Mac Xcode C++, but the file is not created. Can anyone help?
 
#include <iostream> #include <fstream> #include <iomanip> using namespace std; //Function prototype void input(double&, double&, double&); void calcul...
[no replies]
Output Code Missing
 
Hello folks. All I seem to be missing is the output part of int main() where I call upon the variables to make my code work. Please Help! -=+=- You are to ...
[2 replies] Last: I fixed it. Seemed to be related to me initializing the functions earl... (by R3negadeGamer)
Include Each Other
 
How can we have two separate files, lets say for example : "Handler.h" and "GameObject.h" If I want to include GameObject.h in Handler.h and Handl...
[1 reply] : If you think about it, what you're saying doesn't make physical sense,... (by Ganado)
piped input to fill array of unknown size
 
int tempSize; //bool file = false; std::string fileName; // diddnt know how else to make a variable limit for the amount of numbers input without a vector....
[1 reply] : http://www.cplusplus.com/reference/vector/vector/push_back/ > array1... (by ne555)
My Switch case codes executes without reason???!
 
javascript:tx('code') Hey Guys, beginner here... for some reason when I run this program after I enter in the file name it starts to execute all the commands i...
[2 replies] Last: Doesnt seem to fix the problem, Here are my two other class cpp files... (by ggrules)
How do i write in code format
 
javascript:tx(Codeeeeee) ')
[1 reply] : Place your source code within [co de][/co de] tags. For example, th... (by mbozzi)
by sreich
Converting celsius to Fahrenheit or vice versa
 
Please help! These are the instructions: Start by writing a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is F = (9/5)C ...
[2 replies] Last: This is all I have so far #include <iostream> using namespace std; i... (by sreich)
Exception thrown when deleting node from doubly linked list
 
Hello! I am currently removing similar strings of two doubly linked lists. This function is partly working. It seems to only run into an error when I have to de...
[1 reply] : > mutable Node *it; ¿why is that a member variable? > listTemp = ... (by ne555)
Date validation
 
Can someone teach me how to check the date and day? The input file are with 10k of listed day and date in txt file with this format "23/10/2017, Sunday". I need...
[2 replies] Last: Consider doing the validation in two steps: a. validate that the line... (by JLBorges)
Passing an array to a function
 
How do I pass an array of ints to a function? Getting invalid conversion from 'int*' to 'int' [-fpermissive], at this line entryQueue.push(Process(inName, inP...
[1 reply] : I see no reason for that to happen. Are you sure this is the code that... (by Peter87)
Use of undeclared identifier with Scope Resolution Operators and Header File
 
Hello, I've been trying to get this Trie program to work for a while, and keep getting the same error "Use of undeclared identifier" for the four functions in m...
[1 reply] : In the main function you need to call getNode() on a TrieNode object. ... (by Peter87)
Pi Approximation
 
I have to write a program which approximate the number pi in two different ways. I get in my IDE the right results. The higher the input the better should be th...
[1 reply] : Hi, You have 2 variables which are un-initialised, can you figure out... (by TheIdeasMan)
Logic Gates C++ Program
 
Hi, I am assigned to design a C++ program that simulates a combinational logic circuit. For example, i will be prompt to select the logic gates i want (AND, NOT...
[no replies]
Satoshi Nakamoto - BTC Source Code :: base58.h
 
I'm just browsing the original Bitcoin source code archived at https://github.com/trottier/original-bitcoin and I have a couple questions about it so far: 1) ...
[3 replies] Last: Ok good stuff. (by JohnDeBord)
Help with a linked list problem
 
(I originally posted this in the beginner forum section but I think it should have been posted here instead after reading the rules more not completely sure tho...
[2 replies] Last: Maybe I'm missing something here but when I try to display the table w... (by ralversity)
Metaprogram stops reporting at the first error
 
Hi, I copied Erwin Unruh's first metaprogram to print primes using Visual Studio 2017 latest version (15.6.2). I also ran it in metashell with the same re...
[5 replies] Last: Hi, The awkward thing about this is that the Unruh's code produced er... (by TheIdeasMan)
by ir8o8
Functions
 
Hi all, I need some help on what is going on with my code. So, I have a file, called data, and it contains some unknown number of lines that I have to read all ...
[3 replies] Last: I have this so far. Now it is only printing out the two first characte... (by ir8o8)
March 2018 Pages: 1... 56789... 15
  Archived months: [feb2018] [apr2018]

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