Beginners - November 2013 (Page 74)

military change to normal time?
 
it does not give me the right time if i do 00:55 this is what it gives me { Type in time to convert from military 24 hour time to AM-PM Hours in the ran...
[1 reply] : Trace what is happening Lets follow hours if hours = 0 h = 0 input(... (by mobotus)
Testing integers for nearness to each other
 
I'm working on a homework assignment, and one little part has me stuck. I get an 8 character phrase from the user, convert the chars to int pairs based on a tel...
[5 replies] Last: Thanks everyone. Narrowing the scope of the parenthesis did the trick.... (by kenglong)
Bubble sort algorithm
 
I'm back again! This time, I'm supposed to write a function that calls the bubble sort algorithm. I seem to be having trouble printing the sorted array. I'm sup...
[1 reply] : bubbleSort(array, n); (by ne555)
new to c++ and i have just 2 questions about project i did
 
so we have to make a program that grade several multiple-choice exams. i did the code, as shown, but i dont know how to do a maximum score, average score, and...
[no replies]
Lines From File To Structs? Help Plz
 
I'm trying to make a song library/search sort of program. The program needs to have an entry/ID number for each song (Going up by one for each new song added to...
[3 replies] Last: Bump (by Glorinar)
by mjyz
So lost with functions
 
On lines 45 and 83 it is telling me "Expected unqualified-id" what does that mean? I can't seem to notice the error. I am so lost with how to read from files an...
[3 replies] Last: @JockX @mobotus thank you that worked perfectly. Any advice on how to ... (by mjyz)
Any idea how to read this?
 
Any idea how to read this? 6 Raudona, 2 2 4 2 8 3 6 3 9 8 1 2 Mėlyna, 3 -4 9 -4 6 -10 Šviesiai violetinė, 9 4 -1 -3 5 6 9 7 Geltona, 9 8 5 3 4 1 8 3 O...
[3 replies] Last: Here's one way. Read the whole line and then use a stringstream in ord... (by Chervil)
Do not understand definition of a special class constructor
 
Hey guys, I need your help once again. I try to understand a class definition . The code looks like that: class matrix { public: matrix(int...
[4 replies] Last: Yes, of course I meant nothing other than if ( n==3) :D Thanks a l... (by stubborn)
I NEED HELP WITH FILES
 
I have read through the tutorials on here and I just cant get my head around it. Alls i need to do is be able to open a file and then use it in my program. I am...
[4 replies] Last: I have it working now thanks to what you said :) thanks alot (by JONOEFC)
While(cin)
 
May I know what does this code do? Just a beginner, but I have never used this code and would like to know how to use it or specifically what does it do? Import...
[8 replies] Last: while(number) is valid, because 'number' is being evaluated as an ex... (by xismn)
by Adas
I have trouble with for
 
If n=3, these two for loops gives me answer like: 0 2 0 1 0 0 1 2 1 1 1 0 2 2 2 1 2 0 And I want answer like this(I will use it in double array): 0...
[2 replies] Last: Thank you Ispil. The code works perfectly. (by Adas)
Code aprox. of pi does not run :(
 
I had to write a code that approximated pi. The code compiles, but nothing happens when I run it. What should I change. #include <iostream> #include <cmat...
[1 reply] : Remove the semicolon from line 13, while (totalcount < 1000000); ... (by Chervil)
DISCOUNTS NEED HELP PLEASE
 
Trying to figure out how to put the discounts for senior - 30% membership for 12 or more months is- 15% 5or more training sessions is- 20% How can I make t...
[2 replies] Last: Im really stuck but i will try to determine the rate in lines 59 to 61 (by Hickeyhead247)
Throwing out highest and lowest values from a group of values
 
Hi all, Quick question. How would one go about taking 5 to 10 numbers and throwing out the highest and lowest value after finding those two values? Can onl...
[2 replies] Last: OK, that makes sense but how do I put that into a statement or functio... (by newlearn33)
'nothrow' or alternatives
 
Hello, i've been studying c++ coding thanks to the preciuos contents of the forum; i have a question please. i was wondering, what is the best/most used wa...
[5 replies] Last: thanks JLBorges . that's much clearer now! (by ardengo)
If, else or switch based program (roman numbers) - help
 
I'm new to programming and I just need help because I'm stuck. We need to make a program that will turn arab numbers from 1 to 50 to roman numbers, but when y...
[no replies]
text based game trouble!
 
Im trying to make it so that when the battle() function is called on enemy.dummy, its .attack id displayed.help! #include <iostream> #include <iostre...
[16 replies] Last: thanks, fun2code. I'm teaching myself by making a game and learning a... (by ASCII14)
by Ltp
Long value print
 
Hi there. I have a simple problem. I know You solve it easily.. :p How can I print this type of floating number? I dont need straight cout. I need this value...
[4 replies] Last: You'll need to use a bignum implementation. 95123**12 = 5488156205177... (by Duthomhas)
by adv100
arrays, random number generators, and for loops
 
I am trying to use a random number generator (RNG) to fill in the array. The array is 25 numbers long and i want the the random number generator to create the ...
[2 replies] Last: thanks! that was great! (by adv100)
Trying to store multiple user input then add all together
 
I am brand new to c++ and not sure how to store multiple user input without doing this int a; int b; int c; int d; int e; int f; int g; int h; int i; int j; i...
[3 replies] Last: entries[0,1,2,3,4] == -999 This syntax does not compute. One would ... (by keskiverto)
November 2013 Pages: 1... 7273747576... 80
  Archived months: [oct2013] [dec2013]

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