Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #2K
~31.2K People Reached

27 Posted Topics

Member Avatar for Zcool31

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, …

Member Avatar for BeautyBeast
0
1K
Member Avatar for Zcool31

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 …

Member Avatar for Константин_2
0
19K
Member Avatar for triumphost

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 …

Member Avatar for deceptikon
0
522
Member Avatar for Chuckleluck
Member Avatar for Ketsuekiame
0
194
Member Avatar for caltech

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?

Member Avatar for caltech
0
138
Member Avatar for Zcool31

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++ …

Member Avatar for Zcool31
0
658
Member Avatar for Labdabeta

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?

Member Avatar for Labdabeta
0
285
Member Avatar for Vasthor

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 …

Member Avatar for thines01
0
143
Member Avatar for stevanity

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.

Member Avatar for Zcool31
0
111
Member Avatar for devindamenuka

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 …

Member Avatar for Zcool31
0
872
Member Avatar for Zcool31

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 …

Member Avatar for Zcool31
0
3K
Member Avatar for jimJohnson

[CODE] Node* findSomething(Node* listToSearch, int whatToFind){ while(listToSearch->next) if(listToSearch->next->data==whatToFind) return listToSearch; return NULL; } [/CODE]

Member Avatar for jimJohnson
0
181
Member Avatar for Zcool31

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 …

Member Avatar for Zcool31
0
202
Member Avatar for KRal

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 …

Member Avatar for dusktreader
0
120
Member Avatar for Behi Jon

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, …

Member Avatar for Behi Jon
0
361
Member Avatar for wiglaf

[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]

Member Avatar for Frej
0
2K
Member Avatar for Zcool31

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. …

Member Avatar for Zcool31
0
230
Member Avatar for Zcool31

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 …

Member Avatar for MosaicFuneral
0
475
Member Avatar for edb500

put [ code = cpp ] and [ / code ] around your code plz. without spaces inside the brackets of course

Member Avatar for edb500
0
88
Member Avatar for Zcool31

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 …

Member Avatar for Zcool31
0
246
Member Avatar for Zcool31
Member Avatar for Zcool31

[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 …

Member Avatar for nucleon
0
97
Member Avatar for Zcool31

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: …

Member Avatar for Zcool31
0
229
Member Avatar for Zcool31

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 …

Member Avatar for Zcool31
0
110
Member Avatar for Zcool31

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 …

Member Avatar for MattEvans
0
133
Member Avatar for cppStudent

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 …

Member Avatar for Agni
0
86
Member Avatar for wonder_laptop

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 …

Member Avatar for Zcool31
-1
88

The End.