Beginners - August 2012 (Page 42)

generate -,+ and * randomly
 
Hi i would like to generate -,+ and * as char randomly. Please can some1 advice me?
[4 replies] Last: The common technique is called a 'look-up table', or LUT for short: ... (by Disch)
by Hit
questions
 
differences between: const int ROWS = 17; const int COLS = 17 and enum { ROWS = 17, COLS = 17 }; I know not to use macros for C++, but confused ...
[1 reply] : const int ROWS = 17; const int COLS = 17; This is good: you have two... (by Cubbi)
Should I have more knowledge at this point?
 
I've just finished chapter 2 in the book "Beginning C++ Through game programming Third Edition" Chapter 2 involved learning if statements, switch statements, wh...
[9 replies] Last: Thanks, guys. I really appreciate all this advise, and I now feel a mo... (by DJLad16)
for loop help plz
 
How can i get a for loop to display a character, say "~", a certain number of times? thats all it needs to do. thanks
[16 replies] Last: Well I am in a beginner class and we HAVE been putting namespace at t... (by Moschops)
Help me understand whats wrong
 
I have the following code using namespace std; #include <vector> #include <functional> #include <algorithm> #include <iostream> #include <iterator> t...
[4 replies] Last: Ahhh, tnx alot ne555 (by joggilil)
for loop inside for loop
 
Hello everyone! I am a beginner in C + + and I have a question about for loops . I understand the global concept of a for loop , but I do not know how it wor...
[16 replies] Last: Now it's ok. Thanks people! :) (by Shifter12345)
Some allegro commands not responding.
 
The problem is very simple. The command ALLEGRO_EVENT_KEY_UP is not working, though ALLEGRO_EVENT_KEY_DOWN is. Also, even though i am doing everything according...
[3 replies] Last: Oh now i see what i did.... thank you so much! I didnt realize it was ... (by flamesscarlet)
string compare
 
how to compare to char strings in c++ can i use strcmp()????
[2 replies] Last: It would be better to use actual C++ strings, rather than C-style arra... (by Moschops)
by SGM3
Adventure book
 
I would like to write a "Random" adventure book, with a little user input. I will have to pass data to functions, which is not a biggie. I would like the progr...
[1 reply] : I would say store your stories on separate text files or in a differen... (by Need4Sleep)
operation in C++. Please, help me :)
 
Can you please help me with this question. Please give me a brief explaination. thank you so much. If a, b, and c are integer variables, some of these ...
[1 reply] : = is assignment, it puts the value into a variable == is comparison, ... (by TheIdeasMan)
by ToniAz
How good is qsort() in stlib.h
 
Hello everyone! I'm writing a median function that would most probably be called no less than 500,000 times in one run. The data size/cardinality is however 5,...
[5 replies] Last: Maybe your library functions implement efficient data structures inter... (by TheIdeasMan)
by kalkas
Quick question about gcnew
 
Hi, I'm writing a windows form application in which a have a listBox Object. In first it's empty. To add items I just say: myForm->myListBox->Items->...
[4 replies] Last: thank you for your time (by kalkas)
Deleting Element from Vector with an Iterator
 
How would I do this? std::vector<Bunny> v1; std::vector<Bunny>::iterator _it; for(_it = v1.begin(); _it != v1.end(); ++_it) { if((...
[4 replies] Last: Reading the documentation, your last example should erase all the elem... (by TheIdeasMan)
question about parameter
 
my parameters are not working. do u need space or what?
[2 replies] Last: void foo(int a, std::string b) { } (by TheBestHacker)
by KarelC
Command Line TicTacToe
 
I recently completed a command line tictactoe, and was wondering what I could change to make it better, besides making it object orientated which I am just star...
[4 replies] Last: Thanks for replying. I actually did think about doing it that way at f... (by KarelC)
by SGM3
Loops (1,2,3,4,5,6,7)
 
I am trying to understand loops very well before I move onto the next section of C++. I am attempting what may be a task beyond my knowledge. I have made a gue...
[125 replies] Last: OK, the while loop you found had the ! in it, so be careful copying co... (by TheIdeasMan)
Matrix mult help (pointers)
 
Hi guys, Having an issue with matrix multiplication. For the final matrix, I get the proper size for example A * B = C . I also know the algorithm is...
[6 replies] Last: Thanks a lot for the help. I was looking however to returning the obje... (by toomanystars)
map<key, T>, less_key
 
Hi All, Does anyone know that is there a way that I can change the map order from less to kind of "more"? For example: There is a map<string, int> called...
[3 replies] Last: @ne555 Thank you for your answer, the second method. That's what I exa... (by lixinsbgtf)
Typecast struct pointer
 
Guys I have a small problem could anyone explain please what does the following line does please ? char packet ; IPV4_HDR *v4hdr = NULL; //(IPV4_HDR is...
[4 replies] Last: You have to cast the char* to an IPV4_HDR* in order for it to work syn... (by Lowest0ne)
August 2012 Pages: 1... 404142434445
  Archived months: [jul2012] [sep2012]

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