Beginners - April 2014 (Page 3)

Measuring elapsed time
 
What is the best and/or simplest way to get and measure the difference between two times? I saw t...
[1 reply] : Hi, time() returns time in seconds, while clock() returns time in mil... (by closed account 2AoiNwbp)
How to add in a random seed. with desired input (1,2)
 
hi i am doing a program that requires me to input a random seed (already chosen) and input a maximum...
[28 replies] Last: Your welcome =D (by closed account j3Rz8vqX)
by Cobain
Help with Classes & Objects
 
Hey guys,this is my first attempt at writing Object-Oriented code, so please forgive me if some part...
[2 replies] Last: Worked perfectly, thanks for your help Peter87! (by Cobain)
Im getting a huge number which is incorrect. please help.
 
I am brand new to coding and am trying to learn it myself, Im a business major thinking about switch...
[4 replies] Last: Thank you very much. :) (by closed account G20RfSEw)
2D Array Class constructor and operator[]
 
so to use in a bigger program I have to write a two dimensional array class, using a provided 1d arr...
[6 replies] Last: Thank you. Got it. That's the reason for line 15 in your code. It per... (by closed account D80DSL3A)
by Tieria
In class sample program demonstrating header files won't compile?
 
Hey guys, In my C++ course we have just started dealing with programs that are comprised of a h...
[7 replies] Last: Oh ok, thanks! (by Tieria)
Returning a pointer to a structure
 
Can someone help me fix this program, it need to return a pointer from this function, but i dont und...
[11 replies] Last: I solved it and got everything formatted. #include <iostream> using... (by derpmaster)
robot
 
even if i push the up or down key it wont change the feet number it always thinks its 20. Also how w...
[1 reply] : i fixed it #include <iostream> #include <windows.h> #include <coni... (by kmtompkins)
Calling 2D vector elements is causing a crash?
 
Hi! Right now I'm trying to just have the grid() function print out the initialized tic tac toe boar...
[2 replies] Last: Oh, wow. I feel silly. I should probably practice with scopes of func... (by ECEsasha)
Need help!
 
I am trying to close the input and output files in my functions after im done with them, but i am ge...
[1 reply] : void pay_report(string, string, ifstream, string, char, float); // ... (by nvrmnd)
increasing numbers
 
the error im getting is "operator has no effect; expected operator with side-effect" on lines 19 25 ...
[1 reply] : n+1;//isn't doing anything. n++;//is incrementing the value of n by 1... (by closed account j3Rz8vqX)
Help with code for counting the occurrence of NUmbers
 
Hey guys, I am still new to C++ programming and I really need your help, I am trying to write a code...
[3 replies] Last: Thanks guys I think most of the problem came with my sorting loop. I h... (by closed account Eh5fjE8b)
Getting a Total
 
I've been having trouble getting all my cin amounts to add together for a total amount that I can us...
[5 replies] Last: the other way would be to use reference variables, but that's a tiny b... (by pepstein)
key pressed
 
how would i read if different keys are pressed and output accordingly. #include <iostream> #i...
[1 reply] : if( GetAsyncKeyState( VK_LEFT ) & 0x8000 ) (by closed account j3Rz8vqX)
by Fner
Need help with a running total
 
So basically i need to keep a running total of the amount of tickets, single and return ticket, amou...
[4 replies] Last: Still can find a solution. Think i may be putting it in the wrong plac... (by Fner)
I NEED URGENT HELP?!?!?
 
During a loop (for loop), say the user inputs a number and the loop repeated itself the number of ti...
[1 reply] : you could just create a variable called total or something and have a ... (by pepstein)
What should I do after reading Accelerated C++, and also Programming Principles and Practice Using C++?
 
I've got two great books, Accelerated C++ by Andrew Koenig and Barbara E. Moo, and also Programming ...
[no replies]
Maze game, inputting into 2d vector
 
I am attempting to create a maze that is imported from a file and then placed into a vector that hol...
[1 reply] : any ideas on how to do this? (by pepstein)
help please!
 
sorry I just can't figure this out. I want to output an error message whenever I input letters and...
[5 replies] Last: thankyou again! very much appreciated. (by emeriffic6969)
What will this rand generate?
 
Can some one help me what will AJ =(( rand() % 20 ) + 1) * 100 ; generate and how does generation ...
[1 reply] : It will create a random value. Then mod it by 20; limiting its value ... (by closed account j3Rz8vqX)
April 2014 Pages: 12345... 67
  Archived months: [mar2014] [may2014]

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