Beginners - March 2011 (Page 21)

In need of assistance
 
K so I need to find all multiples of 3 and 5 below 1000 and add them all up. Unfortunately I'm kinda stuck in the adding part. heres what I've got by now: #in...
[3 replies] Last: ok thx people :) I did it. Also, if you want some problems to solve, g... (by Faramar)
Trouble with passing by reference
 
Hey there everyone. As it stands I am making an asteroids game in which there are multiple classes. So I decided to do the approach as OOP as I can. So each cla...
[8 replies] Last: Well I have been doing the following with reference to the globals in ... (by Chazzmundo)
by vlad61
Pointer
 
Hey guys/gals I Pointers are confusing... mostly because i just dont see why they are such a big deal.. so i have a question. #include<iostream> using namesp...
[4 replies] Last: Thanks guys, its just a tad more confusing than loops and if statement... (by vlad61)
Total Noob: Working With Nested Class
 
Hello. First post. I've just recently started learning c++ by following the tutorial on this site, mainly for reference, and the occasional google search. Just...
[5 replies] Last: #include <iostream> using namespace std; class Ship { public: ... (by pradheep)
Simple guessing game!
 
Hi guys! Im working on a very simple guessing game using a random number generator, the problem is that I wanted to give the choice of different difficulty leve...
[3 replies] Last: Thanks :)....it was so simple, can't believe I didn't se it. (by monkeyboy)
Beginner Exercises: Bracketing Search
 
#include<iostream> int main() { std::cout<<"Let pc to guess.\n"; int guess, upper=100, lower=1; char judge; while(true) { guess=(up...
[4 replies] Last: Line 14 of your code has a ton of spaces which is makes the page stret... (by lordmat)
by Ernest
I can not get this code to compile...Not sure why?
 
// This program demonstrates the IntQueue class #include <iostream> #include "IntQueue.h" using namespace std; int main() { IntQueue iQueue(5); ...
[2 replies] Last: Read the compiler error messages. They make it clear. IntQueue.h:12:... (by Moschops)
Pointer abort protection?
 
Hey folks, I found following code snippet: (that is all) ptr != 0 && ptr->next(); I don't understand the idea. Can somebody explain this to me? ...
[5 replies] Last: Firstly, you should bear in mind what filipe said - that this is not a... (by anonymous23323124)
vector push back runtime crashing
 
Counter = 0; int counter2 = 0; GreenBox = al_load_bitmap("Media/Images/GreenBox.png"); int Xincrement = 270; int Yinc...
[2 replies] Last: I switched it to a for loop and now it works. but all my while loops a... (by shadowvillian)
Timer
 
I would like to put a timer for my program.. I'm making a program that is somehow like a quizbee.. I would like to allot 10 seconds for the questions..when th...
[10 replies] Last: You're welcome. (by oldnewbie)
Total Noob
 
Hey, I am brand new here. I'm ashame to say that I'm having trouble at the first tutorial. Actually, I use Dev-C++ and I wrote the program just like in tutorial...
[11 replies] Last: Dev-C++ is always a bad thing. The compiler coming with it is very old... (by Bazzy)
Smaller and more effective code
 
Hi could this code block be done in a smaller and more effective way. It feels to be to much code. if(diam<=3 && diam >=0.50) {if (tk=="f")tolklass =0.05; ...
[4 replies] Last: Use lookup tables: double lut = { /* f, m, c, v */ {0.05... (by Disch)
GetMessage/PeekMessage
 
I know how (GetMessage(&msg, NULL, 0, 0)) works, But how does it differ from (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) And whats the best one to us...
[17 replies] Last: [quote=TpOreily]For this: while (PeekMessage(&msg, NULL, 0, 0, PM_RE... (by WriteGreatCode)
Array functions
 
How do you make a function that returns an array?
[3 replies] Last: As I remember, there is no array return allowed from a function. Anyon... (by vencent)
by Menses
Using Functions
 
I just want to thank sorthon and Ramses12 as well as a host of others...for their input on my last program..that knowledge was invaluable...I now want to tackle...
[2 replies] Last: HINT: [co de]your code[/co de] -> your code (by m4ster r0shi)
Do while loop repeats infinitely (1,2)
 
I'm creating a calendar program and am trying to make it so that it will repeat the question if you don't enter a valid year, but if I don't enter a valid year...
[26 replies] Last: Why do such a random thing? You can check the state of streams... cin.... (by hanst99)
Arrays
 
please what is the best way for begineer to get used to arrays?
[4 replies] Last: write a program that will store numbers in the array and then try to r... (by genesys)
allegro
 
Hi I just got ms visual studio working with allegro and was wondering what the best tutorial to learn allegro 5 fro game making was.
[14 replies] Last: If you want to program 2d user interfaces I'd suggest learning SDL. It... (by genesys)
I'M COMPLETE NOOB HELP
 
I'm over with my flashlight addiction now it's time for my programming addiction I can't run this program on Microsoft Visual C++ 2010 Express It gives me t...
[3 replies] Last: create a source code that is not a part of a project and also check ... (by genesys)
Program for calculating GPA (help please)
 
Hello, I am very new to C++ and on that same note, even newer to void functions, and using reference parameters. The assignment is to create a program that will...
[6 replies] Last: When it launches, it just says "Press any key to continue..." (by frantic)
March 2011 Pages: 1... 1920212223... 52
  Archived months: [feb2011] [apr2011]

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