General C++ Programming - June 2011 (Page 19)

Unexplained framerate drop
 
Heya guys! I have this function: mgBool Visible; Visible = CCameraManager::Instance()->GetCurrent()->IsSphereVisible(m_BoundingSphere); Visible = TRUE; if (V...
[12 replies] Last: Nvidia Geforce 460 GTX^^ (by Nsanden)
by Jsel
Generate permutations from set of numbers
 
hello, I am trying to write a recursive function to generate all permutations from a given set of numbers. For example, say the numbers 4, 6, and 8 are given. T...
[17 replies] Last: Ok, actually that was really nice, but it also confirms, that getting ... (by rapidcoder)
represent arrays in binary
 
I am developing some genetic algorithms and need to represent the content of some arrays in binary. How does one do this in c++?
[3 replies] Last: I may have misunderstood the question. If you want to write binary num... (by kev82)
A Little Assistance With Virtual Members
 
It's seems as though I can't grasp the whole concept of polymorphism. There's only one thing I know about virtual members( they can be overloaded ). I'm buil...
[5 replies] Last: Ah. Thanks for that, Xander :) Basically, you just summed up the polym... (by closed account zb0S216C)
Question: Undeclared Function When Declared in Separate File
 
Hello and thanks ahead of time for helping me out on this. I am a very new c++ programmer and I am just copying and pasting the initialization code (with hop...
[2 replies] Last: This makes a lot of sense. Thank you very much for the help. It now wo... (by Taloton)
by Disch
Need help testing code (easy!)
 
Hey all. I'm running final tests on my modification to this stb_image lib (what SFML uses to load images). Everything is working great with VC++ 2010 on Win...
[3 replies] Last: Awesome! Thanks, that's wonderful. (by Disch)
libCurl...AAAAAAHHHHHH!!!
 
I can't get a simple ftp upload to work to save my life. The file is created on my server, but it is always blank (0 bytes). I have no idea why. Here is my c...
[6 replies] Last: GOT IT WORKING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!... (by ModShop)
Inheriting functions and adding to them
 
Hello, How would I go about inheriting a function and changing it? Here is what I have so far.. ...Code here... class Item { protected: ...a b...
[4 replies] Last: @CreativeMFS: You need to read up on polymorphism and inheritance ;) h... (by LB)
hlp plz hide url ???
 
how to hide my url in c++ after combile and don't show if edit happen.
[15 replies] Last: any one to learn me to encrypt url or hide in c++ Have you even re... (by king214)
A Very Organized Calculator
 
This will be a "tutorial" of how to make an organized calculator. It will include all kinds of formulas. It is not just a basic calculator.
[1 reply] : Cool, I can't wait until you post it in the articles section! :D (by LB)
by LB
virtual/non-virtual Destructor behavior with Inheritance
 
According to the C++ tutorial here, a derived class inherits every member of a base class except: -its constructor and its destructor -its operator=() members...
[2 replies] Last: Thanks, that's some very useful information. :) (by LB)
performance of pointers to access array elements
 
I am accessing array elements very frequently and want to optimise peformance as much as possible. I would like to know exactly what the computer does with the...
[7 replies] Last: Compiles just fine here on VC++2010 Express (by Disch)
attempt to copy from a singular iterator
 
Hi, I have the following lines in the constructor of a class: cout<<"1\n"; contourPoint s(v); cout<<"2\n"; seed = contourPoint(v); cout<<"3\n"; w...
[5 replies] Last: /usr/include/c++/4.2.1/debug/safe_iterator.h:164:error: attempt to cop... (by onur)
by LB
What Container Type(s) to use?
 
I need a recommendation on how to implement a container type/what existing container type(s) to use for this situation: I need to have a list of objects that ma...
[8 replies] Last: I think he wants to maintain the order the objects are inserted in his... (by m4ster r0shi)
Using #defines inside other #defines
 
#include <iostream> #include <string> #define NUM_CORES 2 #define COMMAND_STRING ("/bin/awesome -mt NUM_CORES -i "+fin+" -o "+fout).c_str() using namespa...
[5 replies] Last: Part of the language required me to allow something equivalent to this... (by helios)
manifest error
 
Hi, Could you please help me with this error? I am using visual studio for this. I tried many things but different type of error comes out. LDR: LdrpWal...
[1 reply] : Read the error. It's telling you that the call to LdrpWalkImportDescr... (by closed account zb0S216C)
im new to programming and i am learning by trail and error as well as reading many books
 
im making a game engine and i have a class.i am wondering how to set certain pokemons base hp and attack stats like in a struct //create pokemon class pok...
[10 replies] Last: You can put functions inside your class, but main() must go outside o... (by anonymous23323124)
global variable not part of namespace
 
So the issue is ive declared a variable in one file and called it in another like so: File1.cpp: classobject *var1; File2.cpp ::var1->Dofunction(); ...
[3 replies] Last: You need to declare the variable in File2.cpp as an external. I sugges... (by anonymous23323124)
Anyway to easily define another class's method in another class?
 
Like, for example, instead of: class InternalClass { public: int ReturnArgument(int i) { return i; } }; class ExternalClass { private: ...
[2 replies] Last: Alright then. Guess I'll have to live with the former method. (by closed account Sy0XoG1T)
passing parameters to constructor?
 
I am trying to figure out a way to pass parameters to a class constructor upon creation. for example; class Object{ public: //Object constructor Object:...
[1 reply] : To call a constructor of a member object other than the default constr... (by Athar)
June 2011 Pages: 1... 1718192021... 28
  Archived months: [may2011] [jul2011]

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