Beginners - March 2017 (Page 17)

Return Value
 
I recently started learning C++. I am going over a book and one thing that I am struggling little bit is return type functions. I am working on this program and...
[4 replies] Last: thanks (by venivediveci)
need help figuring out why 4/n 5/n 6... is printed the the screen
 
Hello, I can't seem to figure out why my program is printing out 4/n 5/n 6/n to the screen when ever I select 1 on the menu which is load quiz. I have looked th...
[11 replies] Last: AbstractionAnon, Thanks for all of your help I will keep working on it... (by pleaseINeedHelp)
How do arrays work in functions?
 
I'm trying to sort a lot of data in a text file so I'm trying to create a function to make things easier. In my function I'm trying to store values in a string ...
[4 replies] Last: we probably need to see the function body. (by jonnin)
by Meden
int/float validation
 
I am trying to write a program which asks the user to answer simple arithmetic problems. One of the issues I am having with writing it is that if the user ente...
[4 replies] Last: the usual way to force the issue is to read everything you get from th... (by jonnin)
Need help finding an error
 
Doing a project for a class and neither I nor the teacher can find the problem upon first look. Am I missing something here? The project includes writing a p...
[3 replies] Last: 1. I don't need to define the main() function because I'm not trying ... (by jlb)
how do i repeat the whole program (my style)
 
Write your question here. this is my style to repeat program int repeat; cout << "continue: type 1 or to exit type 0: "; cin>>repeat; if (repeat !...
[7 replies] Last: While I personally detest using recursion in this way, you could creat... (by AbstractionAnon)
Is there an error in this code?
 
Hello all! I am studying for my midterm and I went through my profs powerpoint and she asked if there is anything wrong with this code: Any problem with this...
[2 replies] Last: getYear(), getMonth() and getDate() must be declared const if you want... (by Enoizat)
Input Looping Statement
 
Hello community, I am trying to make a program that can make 1-10 inputs with 70 characters using loop statement but everytime I run my code it only prints o...
[3 replies] Last: Please, take a glance at the following code for hints: #include <iost... (by Enoizat)
by j rod
How to find multiple modes?
 
I am writing a program that finds the mode of a vector. I need to figure out how to detect if there are multiple modes. Right now it is kind of a flop. How do I...
[9 replies] Last: Have a look at my earlier code sample - it should translate reasonabl... (by gunnerfunner)
loops
 
Im having trouble determining what loop to use and how to use it. I have to be able to have a user enter multiple names and ages and the program must tell who i...
[5 replies] Last: hello, if you want to get line input, you should use getline() as cin ... (by zntr1)
by rantiv
Menu with error checking
 
This program uses functions to simulate Plinko. Our menu function should error check but doesnt do it when a string is entered. So how would I override a string...
[3 replies] Last: Andy's code won't work if you enter an invalid number followed by a wo... (by dhayden)
Questions about '\b' and unary minus
 
I don't really understand the meaning of unary minues operator and backspace. As my teacher mentioned that '-' is used for making the variable to be 0, and I di...
[4 replies] Last: I got hhello, which is what I would have expected it to do. But as n... (by jonnin)
how do i print all command line arguments?
 
i have no idea what command line is all i know is that argc is the number of arguments lets say i put 7 arguments does this mean argc = 7? i can do this...
[6 replies] Last: Minimalism #include <iostream> int main( int argc, char *argv ) { ... (by lastchance)
by zntr1
Correct my Code, please
 
Hello, I have been learning Perl, C++ and Python for the last 5 months and I think I am learning very well. I searched for some online-exercises and tried myse...
[1 reply] : I'm not sure why you have the trapPOS and enemyPos arrays. Why not ju... (by dhayden)
Function help
 
I need to write a function for the following code that passes two values into it from the following code. These are my instructions for the function: Use an ...
[6 replies] Last: one std::cout << can run through all the ternary operators: #include ... (by gunnerfunner)
Please help, while loop combination to end
 
How do I make a three integer combination to exit the while. When using the code that I have, as soon as even enter one nine it ends the program #incl...
[3 replies] Last: Thank you! (by esokoletsky)
Sorting an array
 
So I need help with a sorting function. I have three files: header.h, main.cpp, and functions.cpp. Here are those: ----------------------------------------...
[3 replies] Last: hope you got it but your issue was mismatched parameters, probably a p... (by jonnin)
Trouble using the .find string function
 
I'm trying to find the word "language" in my text file (after that I'll have to do some further processing) but right now my console window displays "found" eve...
[3 replies] Last: Actually it can return zero, but only if the "to find string" occurs ... (by Enoizat)
by tit0n
Question about double linked list nodes
 
What does this line of code do in words? temp-> next-> prev = temp Kinda confused.
[3 replies] Last: and here's an example of temp-> next-> prev = temp being used to ins... (by gunnerfunner)
Undefined Reference Error
 
I keep getting this error undefined reference to 'Stack<int>::add()' How am I supposed to fix this? For reference here are my associated files Main...
[2 replies] Last: Thanks! (by closed account Dz1T7k9E)
March 2017 Pages: 1... 1516171819... 36
  Archived months: [feb2017] [apr2017]

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