Beginners - April 2016 (Page 12)

by kloud
Functions written incorrectly, but I get desired result??
 
Ok there are two functions. The first function(userinput) ask the user to input two values. The second function has a formula and uses the first functions inpu...
[7 replies] Last: I'd also suggest using more meaningful variable names for that functio... (by jlb)
by Bb8417
Formatting a calendar program with a 2-D array
 
Hey all, I am working on a calendar program using a 2-d array. I have it relatively complete, but cannot get it to print out correctly. I need to make it print ...
[1 reply] : I tried using conditionals to control the flow even more, but am still... (by Bb8417)
Help writing a code to find the median
 
I am trying to write a program that finds the mean and median for a set of numbers, based on how many movies a number a students see a month. I have no included...
[5 replies] Last: In some schools, given an even number of values, the median is defined... (by Moschops)
c++ code using arrays and functions(Need URGENT help !)
 
I have to make two functions using array. I am stuck. I put the code that I tried. getSales – prompts the user to enter sales for 5 stores and fills the ar...
[3 replies] Last: Please use code tags. http://www.cplusplus.com/articles/jEywvCM9/ ... (by integralfx)
by WTIAW
Help
 
Write your question here. I'm a beginner.When i use a vector,I want to know where the elements of the vector is? They are located in heap or stack? Thanks!
[1 reply] : A quick Google search will give you the answer. http://stackoverflow.c... (by integralfx)
Best C++ books
 
looking for a good book that will break C++ down in detail. I've read websites and learned a good amount but the more I learn the more questions I start asking ...
[2 replies] Last: Thank u, ill check the first 2 books out then later look into the thir... (by DingaLing)
How do I get this fail check to work?
 
I am not sure how to get this check to work. The program is suppose to take in a string and then print it back to the user reversing every pair of characters. e...
[1 reply] : std::string reverse_pairs( std::string str ) { if( !str.empty() )... (by JLBorges)
by GabeJ
Using multidimensional dynamic arrays as argument in function
 
I am trying to use a multidimensional dynamic array as an argument in a function. I want to display the seating chart of an airplane. The chart is to have a n...
[2 replies] Last: Thank you! That fixed the problem. The only other change I had to make... (by GabeJ)
Output not printing correctly
 
The output file is missing the beginning of the string gameName following the first from the input file and not sure how to fix while( getline(fin >> ws, ...
[no replies]
Unreferenced local Variable
 
I have 4 warnings on this code 1- Unitialized local variable 'winnerAverage' used 2-4 lowest, isValid,highest are all unreferenced local variables Also i...
[1 reply] : Declaration is different from initialization. Declaring is making the ... (by Arslan7041)
Help with a simple code!
 
I need help. My code is as follows. It outputs the correct statement I need on another program. But on the program I am trying to submit it to, it won't compile...
[no replies]
Cannot figure out how to store individual names within a for loop
 
How can i store student names i tried to use a string array, but they don't store names at a given index in the array. void ProcessOneSection(int& numS...
[no replies]
Checking For Missing Input
 
I made this before, but an error with the site, so :/ My problem is really basic, but for the life of me I can't do it. Basically, it's from Stroustrup's begin...
[1 reply] : Also, while I have you FABULOUS people here (shamelessly pandering to ... (by Yawzheek)
Largest index in an array?
 
I have the following question for a bonus assignment: Write a program in C++ that asks the user to enter an array of size N and find index of the largest value...
[1 reply] : #include <iostream> // return int: the position of the largest eleme... (by JLBorges)
How to close out of command prompt through the program.
 
Hey I'm just messing around with c++ since I am new to programming and want to know how to close the command prompt when the user input 'N' after he/she gets do...
[1 reply] : Use return 0; to exit the function, and don't forget another return... (by PBachmann)
Id returned 1 exit status
 
I was working on a problem for school to write methods for a program where main was already written, but got an error when compiling. Since im just learning any...
[1 reply] : The constructors are only declared, they are not defined. Ergo, undefi... (by JLBorges)
return array function
 
I want to return an array from the function findMinimumPath() so that I can take out the print2user() outside of findMinimumPath(). I tried to use the pointe...
[no replies]
by dk1223
Can someone tell me the stupid mistake Im making here to get these return values?
 
Q.hpp using namespace std; template<typename T> Q<T>::Q() { m_size = 0; // if (m_size == 0) { m_front = nullptr; m_back = nullptr;...
[3 replies] Last: private: //nodes of the list struct node { type data; //the ite... (by nsidaris)
by SimonB
Tic Tac Toe
 
I am working on a console Tic Tac Toe game and I found this weird bug I can't seem to find a solution to. When you enter numbers in any order the board cahnges ...
[4 replies] Last: Thanks :D (by SimonB)
help with trees
 
can anyone tell me if my nodeCount, leavesCount,swapSubtrees are correct because im getting an error when calling them here the header file template <class...
[2 replies] Last: note the call in the main is just a test (by warrior757)
April 2016 Pages: 1... 1011121314... 43
  Archived months: [mar2016] [may2016]

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