Beginners - February 2015 (Page 21)

by Karrot
Drawing BMP's On Keyboard Presses
 
I'm a bit of a newbie with C++, and application programming in general. Lately, as I walk down the street, I've had this idea about a game. Instead of using...
[1 reply] : Try out graphics libraries like SFML, SDL, and Magnum. There are plent... (by LB)
by KickAz
Exercises for beginners/more advanced than total beginner?
 
Hey guys, is there some place I can go or a book with exercises that aren't for total beginners but little more advanced. Like not exercises make a function ...
[3 replies] Last: https://projecteuler.net/problems (by mutexe)
help with a loop
 
Hey guys! I'm having difficulty with a part of my program. I am instructed to make a table using a loop. The table should look like. Days Pay A...
[2 replies] Last: Ah, okay. I'm just struggling with how to make the days and pay amount... (by Trapnasty)
by relgin
calculate engine purchase
 
I need to write a program that calculates how many boxes and packages are needed for a specific number of engines. I need to use integer division (/,%) to calcu...
[1 reply] : what if you need 25 engines ? (by ButchCavendish)
extern int in the header file problem
 
my.h extern int foo; void print_foo(); void print(int); my.cpp #include <iostream> #include "my.h" void print_foo(){ std::cout << "value of foo = " << f...
[5 replies] Last: Thank you man for explanation :) Ill just tell how understood it 1st ... (by etrusks)
c++ programing H.W. help
 
Hello, I am having couple of problems with basic c++ programs could any one help me ? 1) write a C++ program that prompts the user to enter two real numb...
[1 reply] : If you have come up with some code and are stuck it would be good to p... (by Texan40)
variadic template function declaration
 
Hi, guys. I just read that when we define a recursive variadic template function, the nonvariadic version of the template function should always be declared bef...
[12 replies] Last: #include <iostream> #include <sstream> static int n = 0 ; template ... (by JLBorges)
by gmac
vectors
 
implement the comp201 vector int class, a simpler version of a vector<int>. The comp201 vector int class has three constructors. The default constructor crea...
[6 replies] Last: Thanks for your suggestions, I will try this out. (by gmac)
by l2iisk
Overloading functions in a class
 
The following code gives me this problem: (I included math.h) base and error are public doubles in the class calc calc::log(const calc& x) { calc temp; te...
[2 replies] Last: Ah okay, thanks so much for you quick help :)) (by l2iisk)
Do While Statements
 
I am having a hard time grasping the idea of do...while statements. Could someone better explain to me how I can get the code I posted to repeat /*******...
[6 replies] Last: You've got to make variable of the correct type. If you want something... (by TheHardew)
by h4ever
How to convert 3 chars to integer and how to extract 3 components of integer? (1,2)
 
I would like to the following: I set three color components: unsigned char R; unsigned char G; unsigned char B; unsigned int color; I would l...
[20 replies] Last: Yeah, I see. I'll correct my terminology next time. (by h4ever)
what is count
 
{ char letter; cout << " I will display the characters for ASCII codes 0 through 127.\n"; letter = 0; for(int count = 0; count <= 127; count++) ...
[1 reply] : http://www.cplusplus.com/doc/tutorial/control/#for (by LB)
If statement
 
If you have an if statement, what do you do to end the program if that statement is true but not if false? cout<<"Enter total minutes parked:"<<endl; cin>...
[5 replies] Last: Thank you (by tygerrock)
by lew13
Class problem (does not name type)
 
I keep getting the error code for all of my class function definitions. It just says does not name a type I have looked around and found no solutions I was thin...
[18 replies] Last: 1. Find the greatest common divisor (GCD) of the numerator and denomin... (by booradley60)
by Kman
Reading from a file to an array?
 
Here's what I have. I just need to know how to put the numbers from infilearray.txt into the array and how to output it. #include <iostream> #include <...
[10 replies] Last: Well generally, if you start debugging from the crash, you can see the... (by LB)
Printing into text file not working
 
The program is suppose to print onto a text file, however, it never actually prints anything. Any suggestions would be great. If you need more information let m...
[2 replies] Last: Wow yip that semicolon was the problem! Thanks for the fast response. (by edwinibon)
Elements in beginning or end of an array in Binary Search
 
I have been trying to understand the binary search algorithm which is quite simple but I have one question which is bothering me. I might have understand it wro...
[2 replies] Last: Thank for your reply Peter. That's what I thought too and it makes sen... (by tahahassan)
Why is there 1 in unsigned long fact?
 
#include <iostream> using namespace std; int main() { unsigned int numb; unsigned long fact=1; cout << "Enter a number: "; cin >> numb; ...
[2 replies] Last: If numb is 5, then the task is to compute 5!. At the start fact is... (by Peter87)
please teach me the following question and comment, on this question in easy wording.
 
Looping constructs are needed when a statement or a block of statement is repeatedly executed until a specific condition holds true. C++ provides three looping...
[6 replies] Last: This is not a homework site. The purpose of these questions is for yo... (by MikeyBoy)
by salah
practice in class ( i dont know how to implement the add time and tick seconds functions) plz need assistance asap
 
#include <iostream> #include <cstdlib> using namespace std; class Time { private: int hour, minute, second; public: Time addTime(Time)...
[no replies]
February 2015 Pages: 1... 1920212223... 52
  Archived months: [jan2015] [mar2015]

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