Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #14.9K
Ranked #2K
~9K People Reached
Favorite Tags

9 Posted Topics

Member Avatar for diamondfist

Ok so you have 2 options here if you want to "move around the object". 1. Use gluLookAt() to change the camera position and move it around the object. If the ojbect is centered in the middle of your virtual window you can use something like this: [CODE] /* Spherical …

Member Avatar for Chris911
0
3K
Member Avatar for DarKKendO

What exactly is the assignment? Because everything you are trying to code here already exists in the standard template library (STL). More specifically in the [URL="http://www.cplusplus.com/reference/stl/list/"]list container. [/URL]

Member Avatar for DarKKendO
0
102
Member Avatar for martin11ph

Map info: [url]http://www.cplusplus.com/reference/stl/map/[/url] It'll work but another (perhaps less effective solution) is to use string.compare() to compare words from your file against reserved words. However this will take a lot more ressources and is far from effective. Just pointing out another way to do it.

Member Avatar for mrnutty
0
153
Member Avatar for ana_1234

Just like firstPerson I suggest using the string type instead of char. To access each individual character you can use the following syntax: [CODE] string line; char firstchar = line[0]; [/CODE] You can use a loop to get each char. Something like: [CODE] for(int i=0; i < line.size(); i++) { …

Member Avatar for griswolf
0
90
Member Avatar for skorm909

Use a string for the name instead of char and if you want to allow spaces use getline(cin, name) instead of cin.

Member Avatar for skorm909
0
207
Member Avatar for xCrusade

I would do something like that: (Note this code might not work.. Didn't test it and don't really have time to.. But you should get the idea) [CODE] #include <iostream> #include <fstream> using namespace std; int main() { ifstream file; file.open("scores.txt"); if(file.fail()) { cout << "Problem opening the file" << …

Member Avatar for Chris911
0
3K
Member Avatar for BlueZephyr

Line 39 remove void. Only have to specify the function type when you declare it, not when you [I]call[/I] it.

Member Avatar for packetpirate
0
271
Member Avatar for baltik08

One way to do it (which is a sucky way really) is to compare each character of your string (string[0], string[1], etc) with numbers from 0 to 9 in a for loop. Quickly.. (for i=0; "condition here"; i++) if(string[i] == '0' || string[i] == '1'... ) counter++; Really lame way …

Member Avatar for Dhruv Gairola
0
793
Member Avatar for mphan228

[QUOTE]My question is when I input .25 three times (which is .75) it breaks out of the loop and doesn't update the slot amount total.[/QUOTE] It breaks out of the loop because of your if statement: [CODE] if(total>=.75) { cout<<" Here is your Cola!"<<endl<<endl<<endl; cout<<" Have a nice day!"<<endl; break; …

Member Avatar for mphan228
0
213

The End.