Beginners - October 2017 (Page 9)

Functions
 
Thanks for the help, I appreciate it a lot
[1 reply] : I was messing with this a few weeks ago as this question seems to come... (by jonnin)
by iif201
Functions in switch
 
Im trying to write a program where the user enters a viewing code and get a cost and the viewing code back. Im trying to use functions as its part of the projec...
[1 reply] : 1) Where does brandNew() 's block end? There is no closing brace. 2)... (by Xenophobe)
pointers to pointers
 
Hi guys I have a similar thread opened up a little while back but this is a question I never asked and one that surprisingly hasn't been asked much on forums ...
[7 replies] Last: I thought I had 3 dynamically allocated arrays? one = new int* ; /... (by keskiverto)
How to allow input of numbers greater than or equal to zero, but exclude everything else?
 
Hello! I've recently started learning C++ in a course at university. So far, so good. However, there is one problem I've been trying to solve for hours now and...
[4 replies] Last: #include <iostream> int get_int( int minv, int maxv ) { std::cou... (by JLBorges)
Urgent Help with C++ Pseudocode Assignment
 
Hi. I need urgent help with an assignment. I have tried getting help from tutors at my school, but none are available at the moment. I'm supposed to write the p...
[1 reply] : think about what you need to do.. first, you need the table, which he... (by jonnin)
Problem with compilation ( text to morse with beep).
 
Deleted because some people copy my code.
[4 replies] Last: Deleted on OP’s request. (by Enoizat)
Can't get my if/else statements to apply to cout
 
Here is the code in question. Whenever I compile, it always gives me zeroes for my total cost and discount #include<iostream> #include<fstream> #inclu...
[3 replies] Last: No. A function only executes if you call it. The function main gets c... (by Repeater)
Error while trying to output values.
 
I'm trying to assign the values in the file to a char. But what's odd was the SIGSEGV error in the infile.getfile(); I'm not sure why. /** Name: Will...
[1 reply] : At line 28, you allocate an array of pointers to char. But each of tho... (by Chervil)
Help for Strings vs. Char
 
Hi all, I'm working on debugging some code so that I can make changes to it. Below is an approximation of the code, it's a function that receives a strin...
[3 replies] Last: Thanks for your question which pointed me in the right direction. I f... (by netyoda)
User integer input & selection
 
How can I have my program count the number of characters in the string that is being entered and then add either 10 or 11 to the character count depending on wh...
[3 replies] Last: there's an error in the last if statement somewhere Repeater’s cod... (by Enoizat)
structs in main method?
 
hi guys I came across this small block of code which I don't understand I'm guessing tm is a struct included with <ctime> BUT why do you have to put struct i...
[5 replies] Last: [quote=ndrewxie]I generally do it because it's more "correct" Bjarne ... (by Enoizat)
save data into an multidimentional array
 
Please help, i'm new in c++. I want to save my datafile into a multidimentional vector or array. so i have this data 1 1 137.254791 ...
[6 replies] Last: > variable 'std::ifstream file' has initializer but incomplete type ... (by JLBorges)
Arrays
 
Hi so this code is supposed to have 8 different inputs, and I want the cin statement to first check if the input is in the array, but I have no idea in how to d...
[1 reply] : Here's a way that is simple to understand: cin >> input; bool input... (by Repeater)
Beginner question. Why will this code crash?
 
If i remove line 7, the code will run. If I don't remove it, it'll run. My question is why would this happen. #include <iostream> using namespace std; ...
[1 reply] : > Why will this code crash? With a conforming compiler, with or witho... (by JLBorges)
Need help with theater seating problem
 
This is the code i have as of now. include <iostream> #include <string> #include <fstream> #include <cstdlib> #include <cmath> #include <iomanip> #include <s...
[1 reply] : Use. Code. Tags. #include <iostream> #include <string> #include <fstr... (by JayhawkZombie)
compiling error
 
I keep getting a error on this project for school im doing can someone look over it and see what is wrong that im missing also can you help me with where to put...
[1 reply] : Well, you should put the return statement after your while loop for on... (by JayhawkZombie)
No match for operator << error
 
So im doing a program where we generate a set of 10 random numbers and reverse the digits of each number, add the digits, and then determine if it is palindrome...
[1 reply] : sumDigits has a return type of void. You need to put the call to it... (by JayhawkZombie)
Extracting the amount of integers that contain the number "5" from a given range.
 
I am writing a program for a homework assignment in which the user is promped for a minimum and maximum range in integer form. The given range is then to be tes...
[10 replies] Last: I was just about to comment again asking about that, THANK YOU X100000... (by cyberdrone)
by Sentoo
File I/O, Vectors, and Classes
 
Hi there, So, I am lost and stuck on how to do this project. One of the issues I'm having is that the code iNumbers.push_back(new Integer("12")); is not work...
[1 reply] : You have a vector if int s, but your class does not have any conversi... (by JayhawkZombie)
Trying to understand this recursive algorithm
 
I try to understand this piece of code So for the recursive function in calculate interest amount. I don't understand why we have to have month-1? And when we ...
[4 replies] Last: Oh you are absolutely fine @Enoizat. Thanks for your advice. I am jus... (by tieuholy)
October 2017 Pages: 1... 7891011... 33
  Archived months: [sep2017] [nov2017]

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