Beginners - April 2017 (Page 21)

Issue with Output of function to convert decimal to roman numeral
 
My progranm compiles but does not output the correct roman numeral. If under 100 it ouptuts a blank and if over 100 it outputs MMMMMMMM. A push in the write dir...
[4 replies] Last: It compiled for me but my compiler did not display these warnings. ... (by TheIdeasMan)
Passing vector of strings and comparing to ASCII values
 
Im using the SFML library and the TGUI library, first one to create a window and the second to have text boxes to get some user input. I take the text, conve...
[1 reply] : Woop woop! Figured it out meself! void Information::isValid(std::v... (by ArmenHeat)
2D array similar to excel
 
I am working on a project that makes a spreadsheet like excel (It is 26 by 26) and preforms certain calculations that will do the following Store specified d...
[no replies]
If Then Else running Then no matter what
 
When I run this it executes the Then portion even if it doesn't meet the parameters. #include <iostream> using namespace std; string word; char first...
[3 replies] Last: Why not ignore the rest after 'a' and go to the Else? Because if the... (by mbozzi)
by rantiv
How to use functions from the class members in main
 
I am making this program simulates an ipod and has songs and makes playlists. We are using lots of pointers which I understand them but not necessarily how to i...
[no replies]
increment operator output doubt
 
I'm new to C++ and have been having little problem with increment operator int b=2; cout<<++b<<"\t"<<b++; Output: 4 2 But,i expect the output to b...
[7 replies] Last: > so its actually related to compiler, It is related to the language ... (by JLBorges)
Function to generate random row/column position in 2d array
 
Hey all, So currently, I am trying to create a bool function, passing in two-dimensional array and the size. This function will generate a random row/ column p...
[3 replies] Last: See: http://www.cplusplus.com/forum/beginner/213027/ (by JLBorges)
STL print everything and swap 2 lines if there is 2 lines
 
my list doesnt print anything #include <iostream> #include <string> #include <list> #include <iterator> using namespace std; const int NUM_LINES = 5; int ...
[3 replies] Last: i noticed that all my computations happen inside of the if statements ... (by seungyeon)
how to add sub classes together
 
Idk how to add the calculateCost from the other sub classes and base class together. Help. void PackageInventory::CalculateTotalCost() { cout << "\...
[6 replies] Last: this function by itself seems OK, the problem is elsewhere in the prog... (by gunnerfunner)
how do i let he user input characters into a list
 
Write your question here. #include <iostream> #include <list> using namespace std; int main() { char a ; char charinput; //declare list li...
[5 replies] Last: Hello seungyeon, I do not use lists very often, so yesterday I became... (by Handy Andy)
Where to check for conditions?
 
Hello All! I am a bit confused on where to check for conditions. This is a separate class that is combined with a base class "Package" and it other sub classes....
[1 reply] : it's better to check these conditions through the Package ctor and ens... (by gunnerfunner)
by Ch1156
help understanding npos code
 
So I am just trying to learn more about strings and I am having trouble with npos, I cant seem to visualize or grasp what its doing, I think I might know but I ...
[1 reply] : So the .find returns the position it found the character at, in this ... (by integralfx)
by const
Searching multi dimensional array for smallest and greatest values
 
Program I am trying to complete initializes a three dimensional array with random values between 0-9, prints the array, and searches the array for the 3 smalles...
[2 replies] Last: Use std::vector::assign to flatten the 3D array into a std::vector –... (by gunnerfunner)
Drunk Walker Program
 
So - Just a warning - this is a big question and will require me to post a lot of code. I'm working on a program called drunk walker. It starts as an array of p...
[1 reply] : Your program does enter the switch statement but then gets stuck there... (by keineahnung)
STL List how do I input a line into the list?
 
i press one the menu i cants input a line it just ,outputs "enter: " #include <iostream> #include <string> #include <list> #include <iterator> using namespa...
[4 replies] Last: why is my "Enter a line " print twice? the new-line character is lef... (by gunnerfunner)
making char's integers
 
#include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main() { char next; ifstream in_stream; in_stream.open("data.tx...
[3 replies] Last: I appreciate it thank you so much!! (by taf0110)
How to enter more than one number in cin
 
Say i Debug my code and it asks me to enter numbers. IF i want to enter more than one number in the cin part, what code would i use? like i know it would prob...
[4 replies] Last: //best way int num1,num2,num3; cin >> num1 >> num2 >> num3; //your... (by seungyeon)
Help with homework and i have no idea where to start.
 
I am seriously confused with my homework ever since we started adding loops to the party. What i have to do is prompt the user for how many numbers they are goi...
[2 replies] Last: Just like joe said. Its really simple if you can use vectors vector... (by kingkush)
by xxvms
find number
 
Hi there :) I am trying to create game find a number. User picks number from range up to 100. Lets say 21. Program should ask user if number he/she selected i...
[4 replies] Last: Hi Coder777 and Skinding thank you for your help :) I will be revie... (by xxvms)
Am I going at this all wrong?
 
So here is what I need to do... Write a program which accepts a total purchase price and computes any discount. Purchase Price Discount %...
[2 replies] Last: I had only 30 minutes to make it so I took a guess. I have no idea wha... (by CloakedJ24)
April 2017 Pages: 1... 1920212223... 34
  Archived months: [mar2017] [may2017]

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