General C++ Programming - November 2012

Placing Enemies/Objects on Tilemaps
 
While working on a tilemap editor I wondered how do professionals include enemies/larger objects into their tilemaps effectively. (I am always playing adventur...
[1 reply] : Bump It doesn't have to be professionals, but I would really like to ... (by Hippogriff)
Sorting Algorithm
 
I'm new to C++ and I'm trying to write a program that sorts a list of times so they're in the most compact order. There are x number of events and each event ha...
[1 reply] : The subject area is "scheduling", and a lot of work has been done in t... (by normvcr)
OpenCV cvPOSIT(...)
 
i call the posit algorithm of the opencv library like it is explained in the example on their website and it works perfectly fine: cvPOSIT(PositObject, &ImageP...
[1 reply] : I suggest you look for an OpenCV forum or email list. ImagePoints must... (by normvcr)
Implementing an Insert method to create a sorted array
 
Hi I am working on assignment where we have to Insert integers into an IntSet in sorted order, I think I know what I am wanting to do in my head however impleme...
[5 replies] Last: I guess that might help, thanks a lot guys it works now (by marcopolo)
Encryption Algorithm: Can't seem to figure it out
 
So, I'm writing a new encryption algorithm to encrypt text by creating a number from text (password) the user gives it. So, there are three parts: identificat...
[1 reply] : nevermind, I figured it out. (by IWishIKnew)
Non-Lvalue in assignment error
 
I'm getting this error in the ending function of my program. The purpose of the program is to convert feet and inches to meters and centimeters. Its giving me a...
[3 replies] Last: Nevermind I have fixed it. Thank you very much Athar! (by weirdonez)
Updating a variable
 
Alright guys I'm making a clock and i would like to update the seconds minutes and hours without having to use system("CLS"); every time this is my code right n...
[1 reply] : There are some other methods listed here if you don't want to use syst... (by Hippogriff)
C++ gameOfLife Problem
 
hey guys i can't seem to find out what is wrong with this code, it would compile, but it won't switch to next generation. #include <iostream> #include <cstdl...
[1 reply] : Your countLife function is wrong. You have to count the number of aliv... (by toum)
Setters and Getters Questions
 
bool operator<(const SubjectCode& c) const {(name) < (c.name);}
[2 replies] Last: You forgot the return instruction. (by toum)
Need help with program
 
I really need help with this, i have way to much to do and i am just lost on how to write this program if anyone can help. Function Format Purpose To crea...
[no replies]
Showing minimum array index problem
 
This is part of my code which finds the "shortest" length out of an array. It can find the minimum length and display it but i cant get it to display the ind...
[1 reply] : Try storing the actual index of the shortest rather than the shortest ... (by LB)
Bank line simulation
 
[no replies]
C++11 Random library usage in lambdas
 
Someone recently asked how to generate strings filled with random letters, so I suggested std::generate() and C++11's random library. Later when I tried ...
[4 replies] Last: Thanks, Cubbi. For anyone wondering what std::ref() does (since it ... (by Catfish3)
Calculator with sin, cos, tan, please help!!
 
Hi!!! I have to create a calculator with +,-,*,/, +/- ,clear, sin,cos,tan,mod. I have working +,-,*,/,+/- and clear. Can anybody told me how can I make wor...
[no replies]
problem with binary input
 
Hi! I'm trying to read a file byte per byte.The file contains "0000 0000 0101 0000..." the code i use is: fstream cbf(address,ios::binary|ios::in|ios::ate); ...
[1 reply] : ok i identified the problem.it was really stupid and i'm glad nobody w... (by MasterAsh)
by kev82
Template argument deduction
 
Given the following template: template<class T>void luaK_pushiter(lua_State *l, T begin, T end, boost::function<void (lua_State *, boost::shared_ptr<T>)...
[3 replies] Last: To put it simple, implicit conversions are not considered during deduc... (by Cubbi)
Postfix to prefix .
 
I need a program that takes in a postfix expression and turns it into prefix form.. I know how to manually do that .. But how to make a program for that ......
[2 replies] Last: I'd just create an expression tree, and from that you can pull out pre... (by ResidentBiscuit)
by Prom
Problem with .gtx files
 
Good evening everyone, Im currently looking into some files. This whole stuff is about game developement ( I know im kind of completly wrong in this forum fo...
[no replies]
by ercz7c
help with "sorting" input function
 
I am new to c++ and am having a hard time with an assignment to write program to build and display a family tree using classes to hold the data for each person ...
[no replies]
Template for specific method
 
I'm creating a class for matrix. It's a homework with templates, so i created 2 methods for multiplication, one where the matrix are equal the other is when i ...
[5 replies] Last: ppl, you saved my life. Thanks so muchh. The problem was the 2 templ... (by demonofnight)
November 2012 Pages: 123... 51
  Archived months: [oct2012] [dec2012]

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