Beginners - February 2017 (Page 31)

No errors but code will not run
 
I get no errors, the code runs and then this weird screen pops up. can anyone help me with this problem? #include "stdafx.h" #include <iostream> usin...
[1 reply] : interest = (*deposit) * (*intRate); //Line 6 double *intRate = 0; /... (by integralfx)
Functions not running/passing values in way intended
 
Hello, I am a beginner to C, and this is my first post on this forum. Any guidance would be great. I am having an issue where I call my function enterPhoneNumbe...
[3 replies] Last: Marking this as solved! void displayResults(int status, string phoneN... (by CisntEZ)
Matrix addition not working
 
So I was given a header file from my professor that contained a class declaration that builds a matrix, as well as can alter a few things about it. Anyway I dec...
[3 replies] Last: I highly recommend you do 1 dimensional arrays for your matrix library... (by jonnin)
Function Overloading C++
 
Source code: Tutorialspoint Question: I want to know what is function overloading used for? How is it useful? Google: Method Overloading is a feature...
[6 replies] Last: Awsome, thank you for your info and help. (by Kourosh23)
Arrays small program
 
I have to: Creates an array of 5 that will accept the names of five animals Creates an array of 5 that will store a list of five animal ages Accept the name...
[15 replies] Last: It is not that hard though. doesn't matter whether it's hard or not,... (by gunnerfunner)
Finding divisors of every number up to 100?
 
Hello, I am trying to find the divisors of the numbers 2 through 100, add them up, and print them out as follows: 2: 1 = 1 3: 1 = 1 4: 1+2 = 3 5: 1 = 1 6:...
[3 replies] Last: Hengry, sorry I forgot to mention I'm doing all divisors excluding th... (by Hayley777)
Trying to transfer this Psuedocode into actual code having a bit of trouble
 
Write your question here. //Start // Declarations // number numberToGuess // number myGuess; // // numberToGuess = 92 ...
[7 replies] Last: myGuess is declared but not initialized (line 6), so it's not 100% cer... (by gunnerfunner)
Can you help? Problem about virtual function
 
#include <stdio.h> #include <vector> struct TPoint { TPoint (double ax,double ay,double az) {x=ax; y=ay;z=az;}; double x,y,z; }; struct TTwoPoi...
[5 replies] Last: Another link to the rule of 3/5/0 : http://en.cppreference.com/w/cpp/... (by TheIdeasMan)
15 puzzles code not working properly
 
I don't know why when I prompt the user to enter the number to replace the '*', the entered number will replace the whole board. #include <iostream> #inc...
[3 replies] Last: Compilation warnings, as per cpp.sh: 96:38: warning: unused paramete... (by TheIdeasMan)
function header help??!?!?!?!?
 
We're supposed to make a print function where we are Once done copying data into vector V, you need to print the contents of V (write a function print that prin...
[4 replies] Last: Thanks guys I got it to output : 5 6 12 87 100 28 35 66 77 29 5 6 1... (by sesslit805)
Setting up a class plan for MineSweeper?
 
Hi there everyone. I am trying to work on an assignment here that requires me to create a working minesweeper games using classes and dynamic memory. These are ...
[1 reply] : I played minesweeper game before and I don't think this is actually a ... (by Yatora)
How to pass a dat file to a function?
 
I'm doing excercises to do with functions for college and one of the questions is A function MaxScore that may be passed the name of a file that contains a ...
[2 replies] Last: You could use this to partially solve your problem. #include <iostre... (by Mantorr22)
vectors to functions, bool key search help!!!
 
WE'RE SUPPOSED TO DO THE FOLLOWING (THIS WAS MY LAB FOR LAST WEEK AND IM NOT UNDERSTANDING IT. NOT SURE IF I SHOULD CONSIDER DROPPING MY MAJOR BUT ITS HARD FOR ...
[2 replies] Last: The following code solves your assignment. It might be fairly easy if ... (by Mantorr22)
Appending pieces of a string results in a blank one
 
Okay, so I've been making a little code to teach myself about compression. Essentially, it compresses a strand of DNA (series of A, T, C, and G) and then assig...
[3 replies] Last: And to fix that, would i specify cmpr in the codeDown prototype? You... (by cire)
What's the advantage of using a Return function than a void funtion?
 
I'm a beginner and I've never used a return function before and have always used void instead, can anyone explain to me a circumstance where return function is ...
[1 reply] : math :) if you think of functions in math, y = f(x) type... then t... (by jonnin)
rerun the while loop for different set of data
 
Hello everyone, When I run the following code, I get a vector of 4 elements and program terminates. (The program runs successfully for the first set of data). ...
[2 replies] Last: Thanks Chervil. It worked. (by nabin poudyal3)
by pumzye
Program Terminating unexpectedly
 
Hello Guys After compiling my program on running its just terminating unexpectedly please advise what i should do ? thank you in advance.. regard ...
[2 replies] Last: Thanks Joe its running now after initialising it. (by pumzye)
Infinite Do / While loop, help!
 
I'm working a parsing program that generates random c++ code. I have a class called Production and once there is a non terminal found in the main string I use t...
[4 replies] Last: Thanks for the help everyone, I ended up using a break statement after... (by astivers1503)
Passing int's and a char in a function
 
In my function and prototype - void battle - I was pleasantly surprised that this worked. I really didn't think it would because I'm using both a char and int's...
[2 replies] Last: Thanks a lot for the quick reply and the info! (by volTron)
Checking input type by user
 
I'm an absolute beginner to C++ and started yesterday but I'm trying to solve this issue that I guess is important maybe. I've browsed the forum a bit and foun...
[3 replies] Last: Hello FastBanana, The problem you are having is because you redefined... (by Handy Andy)
February 2017 Pages: 1... 2930313233... 37
  Archived months: [jan2017] [mar2017]

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