General C++ Programming - February 2012 (Page 40)

by sesch
Weird boolean array thing O_o
 
Erm, I came across a weird problem with boolean arrays, if you declare bool array globally, its whole content is automatically set to false (0s), however when u...
[4 replies] Last: You should read this set of slides: (a few lines down) http://www.sli... (by Moschops)
Value on boolean changes depending on which class is accessing it
 
Hello cplusplus forums :), I have a little bit of a problem that may just turn out to be a simple misunderstanding. I am trying to create a game with a gravi...
[1 reply] : A class' internal variables are unique to every instance of the class,... (by Moschops)
Open Explorer (Specific file help)
 
Hey, I have: #include <stdlib.h> int main(){ system("start explorer"); return 2; } But, I Don't want to open Explorer! I Want to open my appdata w...
[1 reply] : Is AppData an executable file, or a data file? (by Moschops)
by Jinz0
cannot call member function void Deck::build_deck without object
 
Hi there, this is my first post so sorry if i did it wrong lol. Im new ist to c++ and for my uni course we have to construct a deck of card with a build_dec...
[5 replies] Last: Thanks guys, ill let you know what happens when i can, i have to use t... (by Jinz0)
list is blank list
 
Hi all, I met a strange issue, I want to get the union of two list , and my code is below: but I always get the blank returned list, #include <list> #...
[4 replies] Last: @Cubbi, in fact, I am doing my homework , the question is 3.5 in ... (by misserwell)
C++ Bitmap out of bounds error
 
Hello denziens of the fine website cplusplus.com. I recently started using allegro and bitmaps in my projects and I ran into a problem. This may be a rediculous...
[1 reply] : First things first, use code braces around code to make it more readab... (by The Palm Tree Magician)
error LNK2019: unresolved external symbol "void
 
Hello All, I am getting two compile errors and needing help. Please see the description of the program below. And below that is the code for the said progr...
[1 reply] : In general. it is a link error , that is , you have declared some func... (by misserwell)
String to Double (Precise Convertion)
 
Hello, I am working on a calculator. I want to take data from the user as a string and then convert it into a double to preform calculations. I need to know the...
[9 replies] Last: Microsoft's compiler doesn't support extended floating precision (whic... (by closed account o1vk4iN6)
Proper way to handle logic in a game?
 
My question is: What would be the proper way to handle logic in a video game? Here is an example of how ive been doing it: int handle_logic(){ i...
[5 replies] Last: Ok thanks, i'll search up observer pattern right now. I think i tried ... (by Jumbajumby)
by ftg
Headers techniques
 
I always have headers philosophical questions ;) when you write a.h and a.cpp you sometimes need things for the definition of the class that are not needed in ...
[9 replies] Last: About headers and includes http://www.cplusplus.com/forum/general/1316... (by Duthomhas)
List of references to the objects in another list.
 
I'm having to rewrite or redesign due to problems I'm foreseeing in my project. However, to keep the memory usage minimal I'd like to have a list of references...
[1 reply] : I'd go with pointers... that way you can point them to existing object... (by Texan40)
ide for android
 
Hi guys The title says it all really is there a good cpp ide that runs on android. I dont need it to compile the files to native android apk but I would lik...
[no replies]
by jmrag
Warning pls help
 
Apart from the ifs why do i get a warning:Control reach the end of non void function??? bool CleaningEmployee::equal(CleaningEmployee& check){ if (id==c...
[1 reply] : It means that the complier has reached the end of a function, and hasn... (by Wazzak)
Reversal of string
 
Hey guys, I am attempting to take in 2 strings and store them in reverse order in 2 integer arrays. So for example, I enter 12345 into string1 and 54321 would b...
[3 replies] Last: coerced, we aren't talking about C here. (by hanst99)
by Laveer
Update Function
 
What I'm doing, is having a button ( button2 ) check for the file version online, and if the value matches then having it tell a label ( label1 ) to change it's...
[6 replies] Last: Libcurl has some examples. This one grabs a file from remote url and ... (by Texan40)
by Dasat
String to Integer
 
Pls need help, trying to convert a string to an integer this is the sample function i'm using and just a simple test to implement it. #include <iostream> ...
[5 replies] Last: There is nothing wrong with your int convert (const string& str) fu... (by Cubbi)
quicksort 1 million elems
 
Why does the quicksort crash when I want to sort 1000000 elems. I used a random number generator to create 1000000 elems and store to an array. I am using in pl...
[6 replies] Last: Congrats ;) now can you explain what a Prof Distortion Field is? (by LB)
by mav008
Declaring functions outside a structure
 
Hello, how can I declare the following outside the structure? #define do_op(o) \ inline void operator o##= (const XYZ& b) { for(unsigned n=0; n<3; ...
[1 reply] : #define do_op(o) \ inline void operator o##= (XYZ &a, const XYZ& b) {... (by LB)
best way of "pausing" programs
 
i now use: cin.sync(); cin.get(); i know i could also add a cin.clear() but i dont see the need to do that if i just want to pause what do you guys th...
[17 replies] Last: For instance, it is wrong to put a space in my username. The space i... (by LB)
by bwiesn
Scope Error Within If Statement - Abstract Class
 
Need some help with a scope error I am getting at compile time at line 45. In the code below I have an abstract class, jar in which vector_jar and list_jar are ...
[3 replies] Last: You might have to make two sections of code that are the same, only di... (by coercedman66)
February 2012 Pages: 1... 383940414243
  Archived months: [jan2012] [mar2012]

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