Beginners - February 2014 (Page 40)

by modic
Music Game Not Working
 
I am trying to make a simple game where you guess the major/perfect interval from C. For some reason, the second interval won't play. Here is the code.1 #...
[1 reply] : First off, shouldn't it be (rand() % 8) +1 ? Then you get desired rang... (by MatthewRock)
Program won't return 0 as I told it too, program crashes.
 
Hi guys, I was told to create a program using compound data structure in order to store and display student details. It runs fine, until it reaches the end, the...
[5 replies] Last: you aren't writing your class properly. Look up how to define constru... (by IWishIKnew)
Loop back to menu.
 
Throughout my game, the player is given options as to what path they take, and each path ends different. For example, if the player selects 1, they meet a dan...
[2 replies] Last: Thank you, that was easier than I thought:) (by omgbethy)
Printing out leading zero ?
 
How do I get my output numbers to be 0001 instead of just 1. I don't want my program dropping the leading zero as it is very important. The variable I'm concern...
[1 reply] : Look at setw and setfill. (by kooth)
by chofs
error in class
 
Write your question here. hey guys am new in c++.ihve been worrking around de clock to get my class to work..to simply calculate voltage using classes but keep...
[6 replies] Last: the code runs perfactly well in a single but in serparate files it doe... (by chofs)
How to make a propeller shape using for loops?
 
The ouput should be like this: Enter size : 5 .....***** *....**** **...*** ***..** ****.* *****.***** .....*.**** ....**..*** ...***...** .....
[3 replies] Last: Just type "output" text you want to represent as output "/output" (w... (by wildblue)
Class member pointer that can point to any datatype
 
The problem i am facing is for each of my three classes i need the pointers 'element' to point to a specific datatype for each different instances of the same c...
[no replies]
assembly and c++/C
 
Ok so on friday am having my exams in assembly...I did c++ before assembly...and after these assembly lessons I think knowing assembly even helps to write bette...
[2 replies] Last: The optimizer knows a lot more than we think it does. It consistently ... (by JLBorges)
Help with code please
 
I am trying to pass the member variable velocity in my enemies.cpp file and use it in the AI.cpp file to set the velocity to -300. The code goes through to t...
[2 replies] Last: Thank you so much. You also helped me understand referencing more! (by Yoshimiii)
Programme closes
 
My programme is working just fine but when I press enter after entering the game. It shows the last cout but closes imidiately. What to do? #include <iostrea...
[4 replies] Last: It worked. Thank you so much everyone. (by talhabhatti5)
Pointers C++
 
Hello I am trying to fix this piece of code here. int num1 = 100; int &num2; *num2 = num1; but whenever I try to cout num2 I get 0096FEE0. ...
[2 replies] Last: You were printing the address of num2 No. He/she was printing out t... (by mutexe)
Please help with while loops!
 
In this program I am trying to find the roots of any quadratic function the user inputs and then if the user wishes to see a table of values they can also do th...
[3 replies] Last: Ahh Thank you so much. I didn't realize I needed to use "%lf" for dou... (by Namlitiv)
Motion controls function in an odd way
 
Hello all, I'm a newbie here. I haven't programmed in many years, and I wanted to make a very simple platform game. My other code works as intended, and I've ...
[no replies]
by mkory
Hello help with a program please
 
Hello guys i have encountered a little issue. I am doing a program which suppose to take up to a 1000 lines of code and print them backwards. Here is my test ...
[3 replies] Last: The other problem, I think, is the difference between cin>> and getlin... (by ats15)
Problem with my program
 
I recently made a program which calculates pi formulas and I'm having trouble calculating the volume of a cone, every time it receives input, it still print out...
[3 replies] Last: Check if you get the same answer. Igore the static_cast, I just did th... (by ats15)
Simple addition program
 
Alright guys, I was hoping someone could help me with this. Simple vending machine program. Only thing I'm missing is the grandTotal. I want to be able to tally...
[2 replies] Last: Thanks yulingo (by wcsjunior)
Help with vectors?
 
My program needs to read values from a file into a vector and output which are medians. However, I am not getting any output. Any idea what's wrong? #incl...
[1 reply] : Okay I'm pretty sure my error is that I'm not clearing smaller and lar... (by ccwtree11)
Skips a step
 
//Header #include <iostream> #include <string> #include <cstdlib> using namespace std; //Class function class MovieData { private: string title...
[1 reply] : http://www.cplusplus.com/forum/beginner/114875/#msg627086 (by ne555)
by giblit
Bounce Logic Problem
 
I just can't seem to figure out what is wrong with my logic. It works fine when it bounces off the bottom or top but when it hits a side it flips out. #incl...
[2 replies] Last: Wow that works. I think I need to work on my math a bit better. To see... (by giblit)
C++ Loop Invariants
 
Hello, I am learning how to find a loop invariant. For this particular problem, how is the answer val = i? When you get up to i = 2, the value of val becomes ...
[3 replies] Last: Anyways I thought a loop invariant was the same before and after the l... (by giblit)
February 2014 Pages: 1... 3839404142... 60
  Archived months: [jan2014] [mar2014]

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