Beginners - March 2011 (Page 32)

why are normals declared for individual vertices?
 
why are normals declared for individual vertices? Extract from example: GLfloat vertices = {1,1,1, -1,1,1, -1,-1,1, 1,-1,1, // v0-v1-v2-v3 1,1,1, 1,-1,...
[1 reply] : You use the vertex normals for lighting and stuff. http://www.flipcode... (by hanst99)
accessing variables in classes
 
I'm trying to get the x and y's value from a class and theres classes defined within classes and I can't figure out how to get the value from them. class rec...
[3 replies] Last: boxes is a vector, move the subscript operator after it: LevelOne.box... (by shadowvillian)
c++0x std::lock undefined reference
 
I'm learning c++0x threading library and I tried to use std::lock function. When I'm compiling the following code with g++ -std=c++0x -pthread source.cpp (...
[no replies]
how do you write your comments?
 
^^^^^look at topic name^^^^^ over every function I have a comment with a list of keywords so that if I ctrl-f I can find the function e...
[13 replies] Last: I tend to write a small descriptive paragraph above the variable/membe... (by closed account zb0S216C)
Library!
 
Well. I want to make a library in XCode that contains games. I wrote a number guessing game and then I made blackjack. I would like to know how to create a l...
[2 replies] Last: Well, I don't really get what a library that contains games should b... (by hanst99)
by Puck
Function and call throwing errors
 
Greetings, new member and user here, taking up non-web programming for the first time in .... well, I used Fortran and Cobal if that tells you. I'm running N...
[7 replies] Last: nara, I don't think that's a typo. For some reason, escape characters ... (by hanst99)
by ogward
dynamic allocation and polymorphism
 
Hi there! I have an abstract base class Exercise with virtual void presentSpecific()const=0; and two sub-classes Weight and cardio. and now I would li...
[14 replies] Last: Sorry, my mistake. When I tested it, I forgot to put a virtual method. (by ne555)
Not All Control Paths Return a Value
 
in this assignment we're supposed to use recursion as a technique for determining whether a word qualifies as a palindrome. although i'm still struggling to bec...
[6 replies] Last: lol is it that obvious!? ...apparently... thanks for the tip though. n... (by ddosterschill)
by fafner
converting from rgbdata to uchar array
 
I have a class RGBColor with float values r, g and b. These range between 0.0 and 1.0. In my program I have a 2d array of RGBColor instances, and I need to conv...
[7 replies] Last: Ok, I found a way in which I could just save the pixel data as uchar a... (by fafner)
by Nuc
Choose one number from two
 
How do I make my program choose a number/variable randomly? rand from what I know generates a random number. I wanted to upgrade my console app so: if the ...
[2 replies] Last: int v = rand()%2; if (v == 0) { //HERO_BONUS } else { //MONSTE... (by fafner)
Specialization or/and inheritance (1,2)
 
Hello I use vector as dynamic array. If I need my own specific methods for vector<MyType> can I make a specialization or I can only do it with inheritance crea...
[21 replies] Last: I might have not worded this correctly, the thing for me is that to me... (by hanst99)
Visual Basic - Sum of Square Numbers
 
Hello. I want to make a program that will show the sum of the squares of numbers For example User First Inputs Number: 2 And then inputs number: 5 The progra...
[3 replies] Last: UNIX/Linux and Windows aren't programming languages. Both subforums ar... (by Athar)
by jpina
Program closing unexpectedly
 
I'm a little rusty this isn't making sense to me. I've created an array of 5 values, put values in them, and I'm trying to sum them. I used a switch statement...
[6 replies] Last: That is C++/CLI. The problem is that collections is an array of 5 e... (by closed account z05DSL3A)
Overloaded Constructor problems
 
Having two problems with a program I have been having a hell of a time with. Beginner at programming. Constructor on line 14 of the first file is giving me an e...
[3 replies] Last: No, it should be nothing. No return type at all. (by Zhuge)
void set and gets mixed up
 
Update on the coding...Getting errors that I am stumped about. I have been working on this for a few hours not and I am starting to ware down. Line 12 in the fi...
[3 replies] Last: Your constructor does not seem to have an implementation and it should... (by Zhuge)
Help with string in program
 
My assignment is stated as: The maximum allowable deflection of a beam depends on its function. For a floor, the typical maximum allowable deflection, in inche...
[13 replies] Last: Thank you so much fun2code. The program works and I better understand ... (by warscoten)
by mowie1
sudoku slover problem
 
I working on a Sudoku assignment and I am stuck. I have tried changing everything I think possible to get it to work but now results. CAN ANYONE HELP!!!!!!!!!!...
[5 replies] Last: After dong that I got the following errors -bash-3.2$ g++ *.cpp -I/... (by mowie1)
Can you show me a program with
 
I have this problem and I have others like this but I need to find a program that shows how to do this: I need a program able to decrypt an encrypted string -Wo...
[4 replies] Last: quirkyusername : I already checked for programs like this on this for... (by FalconBK0065)
Cannot Access Void*
 
If you don't already know, I'm learning C and memory allocation and management techniques. I've downloaded the Linux kernel source code and I'm currently inspec...
[3 replies] Last: Uh, as I said... I don't really know why exactly you want to derefer y... (by hanst99)
Triangle from Numbers.
 
[11 replies] Last: Yeah it worked thank you very much. I appreciate it :))) (by Uzumaki)
March 2011 Pages: 1... 3031323334... 52
  Archived months: [feb2011] [apr2011]

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