No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
27 Posted Topics
Hello Everyone! I'm using C++ to write a small 2D app with SDL and OpenGL. I'm trying as much as possible to keep my code cross-platform. However, I've hit a bump. I can't find a good, easy way to display text on the screen. I am able to do it, … | |
I'm trying to write a simple game using SDL and OpenGL. Up until now, I was using purely SDL and pixel manipulations on the framebuffer to draw lines and other shapes. However, as you would expect, that got unbearably slow as the number of objects on the screen increased. Now … | |
Re: Well, without any special additions, you have two options: 1:First argument passed is the number of arguments. 2:Last argument passed is to indicate that it is the last one, and you should stop getting arguments. Other than that, you could pass some collection of objects (assuming all of the same … | |
Re: Release the engine as open source. Accept donations. Piracy = defeated. | |
Re: Iterate through each item's sales for quarter 1. Store item with most sales. Iterate through each item's sales for quarter 2. Store ... For each of 4 stored items, print Quarter: Item, amount of sales. Are you trying to do this using some faster method? | |
Hello everyone! I'm looking for a free (open source preferred) source code editor. Ideally it would be as light-weight as Notepad++, gedit, kate, mousepad, you see the pattern. However, the most important thing I'm looking for in this editor is flexible, dynamic, intelligent autocomplete (for c/c++). To be fair, Notepad++ … | |
Re: Please explain why it is difficult to simply have your own code in a different file, then read this file and pass the resulting string to your function for executing other language code? | |
Re: I largely agree with the previous poster. For me its difficult to learn for the purpose of learning, but easy to learn for the purpose of accomplishing a task. Don't learn C++ to learn C++. Learn C++ to use it for... pick something. The first thing I did to learn … | |
Re: Write a templated class that makes some assumptions about the template type. Instantiate it with a type that violates said assumptions. Watch the debugger point you to the constructor when the error is in the instantiation. | |
Re: Advice for asking questions: Don't just copy-paste hundreds of lines of code and expect us to read and understand it all and help you. Narrow it down to just a few lines that are relevant to your question. Nobody will actually copy and compile it. Just ask your question, provide … | |
Hey all! I'm writing a simple fluid game in C++, and I've come across a strange issue. I allocate a whole bunch of arrays of float for use in simulations. During the course of the program, nothing goes wrong. But when I try to delete the arrays, I get a … | |
Re: [CODE] Node* findSomething(Node* listToSearch, int whatToFind){ while(listToSearch->next) if(listToSearch->next->data==whatToFind) return listToSearch; return NULL; } [/CODE] | |
Hello everyone. I am trying to write an application that uses OpenGL (with GLFW) for graphics. It is meant to be as portable as possible, and I try not to have direct interface with platform specific things other than through GLFW (I can also use SDL). The problem is that … | |
Re: This is a very bad way to ask for help. Don't just paste all your code and ask us to fix it. Use the debugger and common sense to narrow down the problem area. Then ask your question in WORDS, and maybe have 3 lines of code to show an … | |
Re: It is my understanding that NetBeans is not compatible with the version of make.exe provided by MinGW. Generally, you should install Msys after installing MinGW and point your netbeans IDE at the Msys Make (all other components from mingw should work) Other IDE's don't have this problem, so Eclipse, Code:Blocks, … | |
Re: [code=c++] #include <sstream> int main(int argc, char** argv){ //... //your code here //... stringstream toPass; toPass << "AdjustSealevel.exe" << Pi; system(toPass.cstr()); //it might me c_str() instead of cstr() not too sure EXIT_SUCCESS; } [/code] | |
Hello everyone! I am trying to use polymorphism to have a little physics simulator that draws objects to the screen. Each object has properties like mass, friction, position, velocity, acceleration and such similar things, as well as a pointer to a SHAPE object which describes the shape of the object. … | |
Hello everyone! I am looking for a simple free c/c++ IDE which does not need to create projects in order to build applications. If possible, I would like something that has code completion on par with MSVC Intellisense, or NetBeans code completion. However, the most important feature I am looking … | |
Re: put [ code = cpp ] and [ / code ] around your code plz. without spaces inside the brackets of course | |
I'm trying to implement a linked list class in a manner similar to STL. Everyithing seems to work fine, but when I try to implement an output operator to let me see what is inside the collection quickly, it starts acting wierd. Note that I use the iterator inside the … | |
What is the platform independent method to get functionality provided by windows.h? | |
[code=cpp] template<typename T> //T is a type which supports the dereference operator void foo(T& param){ //the type of expression *param is defined at compile time U = *param; //U is the type which *param returns } [/code] My question is: How can I implicitly determine the return type of performing … | |
I have a parent class and two child classes that inherit from the parent class. The parent class has a protected pointer to something, and a method to access that pointer. [code=cpp] class parent{ public: int* accessPtr(){ return ptr; } protected: int* ptr; }; class child1 : public parent{ public: … | |
I am trying to make a simple game engine that can display objects to the screen. I intend to implement a collection of Entity* where each Entity is the representation of an object, such as the image to use when drawing it on the screen, its various properties, what happens … | |
I don't want to make a new thread, but I have a relevant question. I am not using directX or opengl, but I do have 2D sprites in 2D space. However the sprites might have arbitrary shapes (circle, square, random blob, wheel with hollow center, etc). I do have masks … | |
Re: put this inside your ChocStock class [code=cpp] ChocStock& operator=(const ChockStock& rhs){ if(this!=&rhs){ delete description; description_=new ChocBar(*rhs.description_); quantity_=rhs.quantity_; } return *this; } [/code] The reason you need to do this is because the shallow copy constructor simply copies the location of the description pointer in a to c, without deleting c's … | |
Re: You could just use a pointer to a pointer, or a vector of vectors if you want your memory to dynamically readjust. try [code] DWORD ** memory = new DWORD*[width_of_memory]; for(DWORD i=0; i<width_of_memory; ++i) [INDENT]memory[i]=new DWORD[height_of_memory];[/INDENT] [/code] or use vector<vector<DWORD>>, then push_back(vector<DWORD>) on your first vector, and push_back(DWORD) on each … |
The End.