General C++ Programming - December 2009 (Page 8)

by elad86
inheritance & polymorphism of template classes
 
i don't know if i'm doing anything general wrong, but it might be a lucky guess that the templates are making all the problems, cause i have no other way to e...
[1 reply] : Inheritance of templates is slightly different because the general pur... (by jsmith)
doubt about class pointers...
 
hi,, i'm new to the forum.i have been coding in c++ for about a year since i first learnt it on this site.i've started coding games recently and i have some ge...
[3 replies] Last: Pointers should be used when any of the following conditions are true:... (by jsmith)
algorithm
 
Does anyone know how could I turn this equation in to a code and solve it with c++? I have an equation like this 87a+ 87b+ 87c+ 88d+ 90e+ 88f+ 88g+ 93h+ 92i+ ...
[1 reply] : Solving equations in C++ isn't trivial. You can try making a matrix r... (by Bazzy)
Crap code performing better than refactored code
 
Hi guys I refactored a big mess of a function and for some reason the refactored version is REAAALY slow relative to the messuy one. I expected it to be a li...
[4 replies] Last: Thanks guys. 64-bit is not a problem, but the calls to math.h defin... (by turbozedd)
by aicnew
functions and arrays
 
Okay, this program is supposed to take the information from an input text file (I put the info at the bottom) and use arrays and functions to display it on the ...
[no replies]
by mrkhtn
Set ADT question
 
I have an assignment to complete by Friday...and for the love of god I'm trying, I've created what resembles a SET but I need to create a Insert function and i'...
[8 replies] Last: Yeh it helped the only problem I had was I had no iterator class in my... (by mrkhtn)
Quick question
 
r2 = func2(num1, num2); Is this valid???
[3 replies] Last: As long as the function is returning something. (by Mythios)
Bool question
 
Is it true that when the Boolean expression in the test-condition of a while loop becomes false, the loop exits?? I am new at this. Thanks!
[2 replies] Last: Yes, but be clear that it doesn't exit until it endeavors to "loop". O... (by Duthomhas)
by xitan
Mixing data types ok?
 
Ok so I read that you can mix data types, however I'm not sure if this is something that's used all the time, or if it's something that should be avoided if p...
[12 replies] Last: Really? It doesn't cause errors? Wow, I had no idea... In general th... (by tummychow)
Undefined reference, leak I can't get my head around.
 
Someone posed an assignment question on beginners forum which I thought I'd have a go at. For some reason my class file compiles fine, but when I try to make th...
[17 replies] Last: I think I get where your comming from, so your saying if I had of simp... (by gcampton)
The problem with the assembler resident program
 
Hello. I'm writing assembler resident program (next TSR) and I have problem now. I catch 16h interruption but I don't know how to catch combination of keys (e...
[4 replies] Last: This is a c++ forum. You will need to find an assembly forum Oh ... S... (by spyrytus)
multiple temp conversions
 
So I have a project due, and I am completely drawing a blank and be pushed in the right direction. I have to take 15 temps and switch them to celsius then after...
[4 replies] Last: Start by writing a function which will convert C to F and then write a... (by buffbill)
by NGen
Working Directory
 
I wrote a header file which loads a DLL. I want to load the DLL from the directory of the executable, but whenever it searches for the DLL it just searches it's...
[2 replies] Last: Assuming you're on Windows (mentioned DLLs): GetModuleFileName ... (by Disch)
1%2 - Modulus Question
 
I am getting differing opinions on the answer to 1%2. Some say you should round and the answer is 1 and some say the answer is 0 because modulus only deals with...
[2 replies] Last: a % b behaves like follows (i consider a and b to be greater tha... (by melkiy)
stl map access problem..
 
hey guys, i think i need your help. So, i have a map with the following form : map<string,list<pair<int,int>>>. I try to access the list via the string nam...
[8 replies] Last: i think i found the solution.. Thanx everyone that helped guys.. The... (by karvoyno)
by dan01
Needing someone to compile this
 
I would appreciate if somebody could compile this source code into a DLL. It's a clientside mod for a game called Garry's Mod. I don't have most of the heade...
[1 reply] : Just wondering, but if you can't compile it, what makes you think some... (by Zhuge)
by tition
is the register keyword thread-safe?
 
Hi all, I am currently insulating my code to make it thread-safe. To do so I am on a "seek-and-destroy" mission for the static keyword (when applied to vari...
[2 replies] Last: The register keyword is only a hint to the compiler, much like inli... (by Duthomhas)
Strange problem with rand(), srand() and...well, random numbers in general ^^'
 
First of all, thank you all for your hard work guys! I have a problem here with a console program I'm developing for my fellow students at university (to hel...
[17 replies] Last: Hehe...next time I'll pay more attention to formalities and efficiency... (by Drake Aran)
Optimization
 
Hi i have function which works with some linked list, the type of linked list is user defined data type which consist of vector, linked list, string ... my que...
[3 replies] Last: You wouldn't want to exit the function without calling dtors. That wo... (by Disch)
by r4gm4n
best way to dynamically create a new array
 
Afternoon. I'm working on a small project due in on Monday. I'm after creating a function that will extend an array. I don't want to use link lists or anythi...
[1 reply] : Resizing an array should not take more than one pass through the array... (by helios)
December 2009 Pages: 1... 678910... 16
  Archived months: [nov2009] [jan2010]

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