Beginners - May 2013 (Page 43)

by klay2
help me with bug in program
 
its really weird if you look in the code it should display a | in the corner of the screen but it doesn't and if you move left twice (hit "a" then enter then r...
[4 replies] Last: well other than the problem I said it works so... its not with the a ... (by klay2)
constructor for class variables which are elements in vector
 
Hi... I have a class with proper constructor defined. It takes a size_t argument and sets the size of an array which is a private member of the class. Its wor...
[2 replies] Last: Thank you..!! (by Harish050887)
Need help with operators
 
Basically my question is how can I assign an operator, + - * /, to a variable and then use it within an equation using that variable? What I eventually want to ...
[3 replies] Last: int add(int a, int b){return a+b;} //etc... int main() { int(*fun... (by BigBlackSheep)
by ngopza
getline function
 
Hi I am trying to read numbers from a file using getline.My main aim is to read the first number and store the number zombies struct as the number of zombies ....
[4 replies] Last: That error is saying that you are using an int variable, zombieCount, ... (by Carm)
by ar2007
recursive function
 
hello I need an opinion on an exercise to be carried out with a recursive function. the function must indicate when and how often appears in a vector, a numbe...
[7 replies] Last: thank you so much Vlad. you are better than a compiler :) bye and se... (by ar2007)
by tomazi
Braking out of if statement
 
Hey people I am writing a program in which i am using a if statement to check if some condition is true, if that condition indeed is true I increment a variab...
[5 replies] Last: the only reason it would do that is if you have it inside of a loop. s... (by giblit)
by abard
Bank Program to Add Account to file and Validate account question.
 
Hi guys, first post here, so please don't kill the nub. The homework assignemnt is basically to take a cpp file and add a switch case to be able to add accou...
[2 replies] Last: *EDIT* Problem Solved, there was an error in the cin and I removed clo... (by abard)
First Time writing code in C++, getting error: 'event' was not declared in this scope.
 
This is my first time every trying to write code in C++ and I do not know what I am doing wrong #include "SDL.h" #include "SDL_opengl.h" #include <iostr...
[1 reply] : You are using a variable 'event' in line 39, which was never before de... (by JockX)
Using Array in for loop need assistance please
 
Getting error messages, program does not work: Assignment: In the sport of diving, seven judges award a score between 0 and 10, where each score may be a floati...
[6 replies] Last: probably your compiler you can a either do what I was doing putting st... (by giblit)
this doesn't make sense.. need help
 
hello i have a very big code so i can't post it all but my problem is in this part: cout <<*this<<endl; if (*this >test1) { cout <<"1 "<<*th...
[10 replies] Last: i had some major updates in my class and i didn't even change the scal... (by gelatine)
homework help! My code wont execute
 
Why wont it execute? #include <iostream> #include <stdlib.h> using namespace std; int main () { int index =0; int temp; int populatio...
[3 replies] Last: @Bourgond Aries The original code unfortunately deleted was like this... (by Chervil)
HELPPPPPP
 
i am trying to a c++ program that will determine if two circles intersect each other. the input will be <x,y> coordinates for the center of each circle followed...
[2 replies] Last: I can help you with math: if sqrt( (x1 - x2)^2 + (y1 - y2)^2) > r1 + r... (by MiiNiPaa)
by jidder
Character moving when it shouldn't
 
Hey, i decided to make a space invaders game after seeing someone else trying on here. Everything works up to now pretty much. There is just one problem with...
[6 replies] Last: what's the best way to clear the console screen ? This depends on th... (by Chervil)
Whats wrong with my switch case?
 
Hello, I begun my journey into C++ and programming this week and I have been able to make some simple programs. I have this homework assignment I cannot solve ...
[3 replies] Last: Thank you Vlad! I got it working. Had to define number of loops with l... (by VeikkoPeikko)
Functions with Value Parameters
 
Hey guys, I hope I'm not being a pain, but when I get stuck trying to understand something, it helps to come here since you guys seem to knock some sense into m...
[3 replies] Last: Great! To be able to output the results in your main routine, I sugge... (by kooth)
by Maulus
Strange errors "hello world" program (1,2)
 
Dear all, I only just started with C++ i downloaded the tutorial from this site and started writing. iam using winAVR-20100110. As you can see i allready ...
[24 replies] Last: Mark this post as "Solved" on the top of this page to avoid more comme... (by OxBADC0DE)
Connect 4 winning condition?
 
What is the the smartest way to check if player 1 or 2 has won the game in connect 4?
[1 reply] : Take a look at this post http://stackoverflow.com/questions/7033165/al... (by OxBADC0DE)
by teand2
Passing Struct To Function
 
Can you guys help me straighten my code out? How do I set up the function call and prototype to pass these structs to the function? Below is what I have but it...
[7 replies] Last: Thanks both of you. It works fine now. (by teand2)
Delaying a function (1,2,3)
 
I want to create a program that is running a few functions that do different things at once and I want to delay only one function without affecting the whole pr...
[45 replies] Last: The MinGW build on the Nuwen distro has been updated from 10.0 to 10.1... (by Vidminas)
echo a number with functions
 
This is a very noob question,i don't understand that why my getline inside the if statement doesn't executes. Can someone point out the problem. #include<ios...
[3 replies] Last: thanks a lot for all your replies. I guess, i have a lot to learn. :) (by dhruv90)
May 2013 Pages: 1... 4142434445... 66
  Archived months: [apr2013] [jun2013]

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