General C++ Programming - March 2014 (Page 32)

Help with a question?
 
Hey all, some im stuck with a problem that im trying to program. Any help with what it would look like is greatly appreciated: Problem 2: The jumping game C...
[1 reply] : Please note, that this is not a homework site. We won't do your homewo... (by MiiNiPaa)
by Bro
Calculate the mathematical constant of PI
 
THE WEEKEND TEASER: Write a C++ program to calculate the mathematical constant of PI: (a) Imagine a circle, whose area is given by: Area=PI*R^2 (b) Now imagi...
[1 reply] : Please note, that this is not a homework site. We won't do your homewo... (by MiiNiPaa)
enum
 
I want to define enumeration inside a structure and use it in some other file for eg header.h typedef struct dummy { typedef enum { ZERO, ...
[1 reply] : // header struct dummy { enum numbers { ZERO, ON... (by JLBorges)
Homework - Compile error
 
Hey guys I am working on a homework assignment for my programming languages class, and I am stuck because of a compile error. My assignment is implementing a re...
[4 replies] Last: > Why is it that you have to define it in the .cpp file C++ makes a d... (by JLBorges)
Console Input and Output at the Same Time
 
Alright, so to better myself with network logic I've decided to make a small net game. I need to input commands to the console as well as output status updates...
[6 replies] Last: I choose C! (by closed account N36fSL3A)
different random number stream for different functions
 
Hi all, I am wondering is there a way to make function A uses random number stream say starting from srand(1) and function B uses random number stream say st...
[3 replies] Last: You should be looking at all of them to decide which one you think is ... (by LB)
Help in filtering objects?
 
I have this code that prints out 5 weapons. How do I filter them? My professor used a for loop but I didn't understand why. Thanks :) void main () { strin...
[1 reply] : What do you mean by filter? (by haglerchristopher)
by bbb718
quick multiplication problem need help
 
how do you solve this problem? I did it like this int b = 4 , p =5, r =2, v=8; double x= 10.2 B=10-v%p*2; i did 10 - 8 % 5 * 2 and got the answer ...
[5 replies] Last: Multiplication, division, and modulo ( * / % ) have the same precedenc... (by long double main)
How to open a finished program directly?
 
I don't know how to put this really, but I finished a program in Qt, and i want to know how to make a .exe file for it, so i dont have to open Qt and build the ...
[2 replies] Last: Oh, well, I knew that, well, the first part. I didn't know building it... (by AceDawg45)
Math in 2D game programming - Examples?
 
I've been programming for a while now, and in my experience I've just used Cartesian coordinates and addition/subtraction/multiplication/division (well operator...
[2 replies] Last: Good ideas so far! In terms of rotation matrices, I'm assuming they a... (by GetOutOfBox)
problems with orders
 
the numbers that i have for my output dont line up. For example ill run the code and it will give me 11245...158 14652...89 19832...373 20014...243 but i ...
[2 replies] Last: sorry didnt know what category to put this under and i need help. (by owenkmc)
by leo255
How to output all possible binary combinations?
 
Hello, I need to create a function that outputs all possible binary combinations. I'm really stumped on this. I have to do it with nested loops, and am not sur...
[2 replies] Last: Even without using std::bitset you shouldn't need more than two loops. (by Peter87)
DirectX 11- Dynamic Buffers - Marching Cubes
 
I am creating a voxel based terrain with a marching cubes iosSurface. The terrain is to be dynamic, in that you can add/ remove parts as you see fit. The prob...
[no replies]
C++ Programming Integer Sum troubles
 
my question is this. A problem that lets the user enter any positive integer, but you do not have to check for this, and then calculates the sum of the digits...
[5 replies] Last: thank you MiiNiPaa! (by Noob Programmer)
Finding rotation direction from two orientations
 
So not sure if this would belong in the lounge or here since it is technically not a programming question and is more maths oriented. So if it needs to be moved...
[1 reply] : 1) Deduct target rotation from current (If I want to rotate from π to... (by MiiNiPaa)
Modules in C++
 
Hi everyone, I am trying to write a program that will display a table with "seconds" and "Distance". Where Seconds goes from 1-12 and the distance is displ...
[6 replies] Last: You just screwed up your formatting. Try replacing line 17 with: co... (by doug4)
by Dkob1
expression?
 
I have to enter a correct expression for (true), would 5 mod 2 work? I'm not really sure how to do this { int i; // to store input from the user cout <...
[2 replies] Last: thanks (by Dkob1)
Help Aligning Function Outputs
 
when i run my code i want each function to be displayed side by side from left to right and i cant figure out how to do it. also cant figure out how to make the...
[no replies]
dynamic arrays error
 
i was trying to make a dynamic array in this form : int x; cin>>x; int ar ; my g++ (gcc) compiler on linux refused to create an array without a fixed ...
[5 replies] Last: no , i mean i used GCC to compile and it popped up errors , restarted ... (by EssamTarik)
by Gyiove
Set window icon ( Freeglut )
 
Hello all! Ive tried everything i found in internet and still nothing seems to work. Ive made launcer.exe what will call dll where inside of it is freeglut_...
[4 replies] Last: [quote=Gyiove]Everything what is not created by me is making new probl... (by LB)
March 2014 Pages: 1... 3031323334... 36
  Archived months: [feb2014] [apr2014]

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