Beginners - August 2012 (Page 36)

Is this the best way to go about making a pokemon-type game?
 
I haven't written any code yet, but would this be the way to do it(I am trying to get used to classes so let me know if there is a better/easier way to do what ...
[5 replies] Last: You should really learn interfaces or virtual classes and inheritance ... (by stoffe1100)
by Chubbs
Inclusive While Loop
 
Hello, How can I get my while loop to run inclusive? I can run the program to get near results but because I add 1 to the first variable that number gets add...
[3 replies] Last: Thanks Just had to do it other the other way around. (by Chubbs)
Typedef and bit masks
 
Does it make sense to typedef an enum used for bit masks? I've seen code where they are typedef'd, but doing so means I'd have to overload bitwise operators fo...
[3 replies] Last: [quote=maeriden] "Does it make sense to typedef an enum used for bit m... (by closed account zb0S216C)
What does this expression thing mean?
 
When I see a table that it showing data types, I get down to float, double and long double. Then on the typical range column it says something like: +/- 3.4e +/...
[2 replies] Last: Oh, I wish it would just say that in the first place because that I un... (by DJLad16)
How to change the value of class object
 
Why is it that when I "cout" out a member variable within a class, it will only "cout" out its default value?...even if it has been changed....at least I think?...
[6 replies] Last: Alright thanks. (by dtaqee88)
by samrux
Tic-Tac-Toe, another problem
 
--First problem solved-- Now, again, Why when I press 1, squares 1 and 2 get a symbol? And when I press 2, square 1 gets locked, and if i try to use it, nothing...
[4 replies] Last: I can't believe i was so stupid. Thanks. Yeah, i usually make choice a... (by samrux)
Finding the length of an array
 
I want to make a variable specifically to hold the number of elements in an array, but the only way I can think of doing this is this: int array ; in...
[4 replies] Last: oh. ok thnx! (by Bufflez)
How to add things to a string
 
For example, in a RPG like Skyrim, you can have a bunch of quests added to your quest log. How would you do this in C++? When you pick up a new quest, or whatev...
[3 replies] Last: There's probably more to a quest than a string. In fact, a quest is p... (by Lowest0ne)
How to check if a variable has been assigned a value?
 
I've been wondering how do check whether or not a variable has been assigned a value for a long time now. Would you want to make an 'if' statement to do s...
[3 replies] Last: Thanks, you guys! from now on I'll make sure to initialize my variabl... (by Bufflez)
Binary to decimal
 
hi I tried to write the program of binary to decimal but what's wrong here? there is no output :( #include <iostream> #include <cmath> using namespace...
[5 replies] Last: Hi first you have to specify if the binary you input has the MSB at th... (by jjjames)
Is this the buffer? I/O stream question.
 
I am really trying to understand what the buffers are for I/O streams. So far as I know, when you move data through streams, the data stacks in the buffer and i...
[1 reply] : the stream object only presents the interface (operator>>, operator<<,... (by Cubbi)
Program involving pointers/class/vectors (1,2)
 
I wrote a program that works fine but to be honest I'm not quite sure why it works. I was kind of guessing as to how to do it but I would want to know why it wo...
[22 replies] Last: I wrote a program that works fine but to be honest I'm not quite sure... (by viliml)
swap the values inside array
 
i want to make sure that all the elements with values of <= 25 are on the left hand side and >25 are on the right hand side. some thing like if the array is ...
[6 replies] Last: thank you for you guys for answers. but it's too advanced for me. may ... (by ethan86)
by gobi
wanna know the difference between the constructor
 
I desperately want to know the difference between the below syntax A* obj = new A; A* obj = new A() ; // why this bracket needed here It may be a...
[17 replies] Last: Yeah , you are right ... Thanks to all :) (by gobi)
How do I add a time delay with Code::Blocks?
 
I've looked at a couple different websites and everything I've tried doesn't work. Any help would be appreciated. Thanks a lot.
[3 replies] Last: If your compiler supports it (which it probably doesn't) you can use s... (by Peter87)
double type variables
 
Hi, Please check following code: #include <iostream> #include <iomanip> int main(int argc, char *argv ) { double someVal = 6.6f; std::cout <...
[3 replies] Last: http://www.cplusplus.com/forum/articles/3827/ basically, you can't re... (by Zephilinox)
Easy Probelm to Fix
 
Code : http://pastebin.com/vypGKwJS I believe the problem has something to do with the code below. void organizeList(std::vector<Contact> &c1) { std::...
[2 replies] Last: *facepalm* I don't know how I didn't see that before. void organi... (by DesiredNote)
by ozza
Password Protection Problem
 
Hi, I'm a C++ beginner making a password protection program, and it works almost perfectly. The only problem is, if a user types their password wrong, it says i...
[3 replies] Last: SOLVED: I simply added pass.clear(); to void Auth() so it now re... (by ozza)
Use of the "?"
 
What does the mentioned command do? In this example, what does it contribute? string sBridge = asEntity=="bridge_lever_1" ? "bridge_metal_vert_1": "bridge_m...
[2 replies] Last: I understand! Thanks for the reply man. I guess I should have been ab... (by TheForgot3n1)
Roman_Numerals
 
Convert Roman numerals to Arabic form How do i find a element in a array? print out the index? So far.... const char*unit = {"I","II","III","IV",...
[2 replies] Last: The Input is The Roman_Numeral(eg...IX) the output should be 9. I also... (by apeshit)
August 2012 Pages: 1... 3435363738... 45
  Archived months: [jul2012] [sep2012]

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