Beginners - June 2014 (Page 5)

Increasing values of elements in list
 
I need help increasing the values of elements in mylist and assigning that new list to mylist3. I tried doing it as you would an array or vector but it did not ...
[9 replies] Last: In other words your final version has: std::list<int> mylist3 ( 0 ); ... (by keskiverto)
Looping in this situation
 
Hello, I am doing some beginner exercises and have been looking around for the internet for an answer to this question, but haven't found one that's entirely ap...
[9 replies] Last: if (options < 1 || options > 7) { // Compare logic with your old cod... (by wildblue)
by Eldion
1stProject
 
Hello everyone I am new in programming and I wish to know or are my faults his fact in Mons three hours that I seek and that I thank you do not find anything me...
[7 replies] Last: Ty man ! Your welcome :) Make sure to click on the button at the top... (by UrbanNinja)
by mehak
command line arguments
 
if my commmand line arguments are myprog one two three then the output of ++*++argv should be n according to me because these operators are right to...
[1 reply] : It is as you described. Step thru this in the debugger. int main(int... (by kbw)
Weird Error "This application has requested the runtime to terminate it in an unusual way"
 
Hello all, First of all thank you for taking the time to help me, I really appreciate it. I would also like to start by saying I am extremely new to C++ and...
[2 replies] Last: Thank you, will try suggestions and indent my code :) I will post an u... (by UrbanNinja)
ofstream error
 
how can i correct his erroer #include <iostream> #include <iomanip> #include <time.h> #include <windows.h> #include <vector> #include <fstream> #incl...
[5 replies] Last: Hello! If your problem is solved, it is very helpful to other users i... (by UrbanNinja)
3n+1 - Wrong Answer - UVA Online Judge
 
Hello everyone, Could anyone please explain why I keep getting the "Wrong Answer" verdict? I don't read the input from a file (only standard console), I don'...
[2 replies] Last: Yes, after posting this topic I continued googling and was more succes... (by alekscooper)
LoadBMP SDL Issue - Help!
 
Trying to Load a BMP Image in SDL and running into an issue. The black screen loads and everything seems to be running correctly. However, I put debug code to s...
[5 replies] Last: Thanks for being that guy! New to the forum and will mark any problems... (by ahackit)
How to remove a vector element based on value?
 
I'm creating a custom CD collector and upon the user selecting the option to remove an existing CD, I'm a little unsure on how to remove it from the vector itse...
[2 replies] Last: Thanks for helping me with that, that makes so much more sense. <3 (by Sausage)
Takes hours for program to run
 
When I run the program it takes a few hours to print the screen. Can you help me figure out why it's taking so long to just print the screen? #include...
[5 replies] Last: Oh wow, I see now. Thanks for explaining it to me. (by Stoneynine)
by Sgreen
Adding floats into a string
 
Hello the question I am trying to solve is: Write function doFrac that returns a string representing a common fraction given its numerator and denominator as i...
[1 reply] : void doFrac(int x, int y, std::string& rep, float& result) { rep ... (by cire)
Random number generation - repetition problems
 
Hi there everyone! I am a beginning C++ programmer and I am trying to create a program which is similar to a 6-number lottery. Basically, it will generate 6 ...
[15 replies] Last: Hi everyone, I think I have a solution working. I used xismn's idea o... (by zeberwood)
by Jakee
Multi-Dimensional Vector Problem
 
So I am writing a TicTacToe game, in which a multi dimensional array is recommended. I am trying to make a board using one but to no avail class PlayingBoa...
[2 replies] Last: Thanks that fixed the issue, I knew it was some dumb little thing like... (by Jakee)
Why am I getting "No operator matches..."
 
After I write cout, the first "<<" is giving me a squigle red line saying that no operator matches these operands. Solution? #include <iostream> #include...
[2 replies] Last: Do you understand why though? The "<<" pair is known as an operator, e... (by Computergeek01)
Exception Handling
 
In this program I am trying to catch the out of bounds input from the user. I have options for 1 and 2, but would like to have an exception put out a message i...
[3 replies] Last: class outOfBoundsNumber { /*...*/ } myex ; myex is a variable defin... (by MiiNiPaa)
Volume of a Sphere- Need Help
 
Hello! I am writing a program for a class I am taking, but I am stuck. The directions for the assignment are: Write a program that (using a function and no mat...
[14 replies] Last: Also, you should try to make the formula more accurate. 1.33 is only s... (by dhayden)
by Drak
Numbers in a file (using arrays)
 
So for the past few hours I've been getting stuck on one homework assignment and it's mainly because I missed the beginning of class one day and that was the da...
[7 replies] Last: Perhaps I didn't make my thought processes clear. What I had in mind w... (by Chervil)
Calculate cost info function
 
Its supposed to receive the cost and markup percentage as arguments, calculates the retail price of the item, then returns three pieces of information: the ...
[1 reply] : Line 54: You can't return 3 items in a return statement. That's not ... (by AbstractionAnon)
by xDann
Capitalization Error ?
 
how can i make this program to accept the answer like Y or Yes without putting this long code (rerun == 'Y' || rerun == 'Yes' || rerun == 'yes' || rerun =...
[2 replies] Last: Several things wrong with your snippet. First character constants can ... (by jlb)
by udnid
Negative numbers in the Fibonacci series
 
In every Fibonacci series program (that i saw) after the 46th number (1836311903) the program starts writing negative numbers (like the 47th = -132375223 instea...
[5 replies] Last: I figured the OP would be more likely to understand that than a declt... (by cire)
June 2014 Pages: 1... 34567... 48
  Archived months: [may2014] [jul2014]

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